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!

Autofill to last cell with data Formula 1

Status
Not open for further replies.

funkmonsteruk

IS-IT--Management
Feb 8, 2002
210
GB
I produce a daly spreadsheet in Excel with three colums, a code, a name and an amount.

The daly worksheets are inserted in a weekly woorbook.

A vlookup formula is then entered into the fourth column of the worksheet to look up the previous days value, this is then autofilled to the end of the shhet and a sum is added to the bottom.

I want to automate this task but cannot figure out how to get VBA to find the last cell to autofill til'... Any suggestions???
 
lRow = range("C65536").end(xlup).row
or
lRow = cells(65536,3).end(xlup).row
or
lRow = cells(rows.count,3).end(xlup).row

lRow should be dimmed as LONG



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

Part and Inventory Search

Sponsor

Back
Top