Hi,
I am trying to create a macro to select the next blank cell in a column and sum the cells above it. However all the examples I can find on the internet dont seem to work.
The column is always column W, the row varies. So far I have the below which selects the cell I want the formula.
now I want to sum the cells above this i.e. normally I could use the below if it is always a set range of rows. but it isn't as the amount of data varies daily.
Any ideas how I can do this?
Thanks,
Andy
I am trying to create a macro to select the next blank cell in a column and sum the cells above it. However all the examples I can find on the internet dont seem to work.
The column is always column W, the row varies. So far I have the below which selects the cell I want the formula.
Code:
[COLOR=#333333]Range("W1").End(xldown).Offset(2,0).Select
[/COLOR]
now I want to sum the cells above this i.e. normally I could use the below if it is always a set range of rows. but it isn't as the amount of data varies daily.
Code:
ActiveCell.Formula = "=SUM(W1:W100)"
Any ideas how I can do this?
Thanks,
Andy