How does a macro total columns when sheets have diff row counts?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to have a recorded macro sum the columns in my range. My
spredsheets have differing row counts so I want my macro to recognize and sum
accordingly.
 
One way:

Dim dSum As Double
With ActiveSheet
dSum = Application.Sum(.Range( _
.Cells(1, 1), .Cells(.Rows.Count, 1))
End With
 

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