Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW MANY cells occupied in a Field ???

Status
Not open for further replies.

medieval

Technical User
Jun 18, 2003
31
GB
Firstly, thanks for looking at this - I hope you can help..

I regularly produce a report with 7 fields. Each Field has the same number of records as another.

However each report may differ from next as the number of records produced will vary dependant upon external influences however as I say the the same number of records
exist for each field.

One Field is in a date format and I need to caluclate the difference in days per date for each record. I can do this
quite easily with the function 'datedif=(E2,E3,"d")'
however how do I get to copy and paste this down to the last cell if the number of records may vary from one report to another ?

thanks for your help,
Medieval.
 
lRow = range("A65536").end(xlup).row
Range("F2:F" & lRow).formula = "=datedif=(E2,E3,""d"")"

for a formula in col F

Rgds
Geoff
Si hoc legere scis, nimis eruditionis habes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top