automate column length

W

wsk

I have a sheet with imported data and the length of the columns can change.
4 of 10 columns have formulas in them. How could I automate adding or
subtracting the length of the column and preserve the formulas?

Also how would I automate the print screen based on the length of the
changing columns?
Excel 2000
 
M

mrice

First record adding your formulae with the macro recorder.

Then edit your macro using the following to return the last row of your
column

LastRow = Cells(65536,1).end(xlup).row
 
Top