Last row

G

Graham Whitehead

To find the last column row in a column use this code:
With ActiveSheet

lngLastRow = .Range("A65536").End(xlUp).Row

End With

you can then set a variable to hold the value at range("A" & lngLastRow),
then repeat this for column E etc.
 
N

Norman Jones

Hi Darin,

Try something like:

'=============>>
Public Sub Tester)
Dim iLast As Long
Dim mySum As Double

iLast = Cells(Rows.Count, "A").End(xlUp).Row
mySum = Application.Sum(Range("E1:E" & iLast))

MsgBox mySum

End Sub
'<<=============
 

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

Top