Sum Columns with code, column s vary in length

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

I am trying to SUM some columns. The only problem is the
columns are not always the same length. I have overcome
this by using the following code:
Range(ActiveCell, ActiveCell.Offset(-1, -1).End
(xlUp).Offset(3, 1)).Select
This selects all values in a column.

Can anyone help in adding the code to sum the selected
values above?

Thanks for any help

Simon
 
ActiveCell = Application.Sum(Range(ActiveCell,
ActiveCell.Offset(-1, -1).End(xlUp).Offset(3, 1)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top