ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Last row (https://www.excelbanter.com/excel-programming/368100-last-row.html)

Darin Kramer

Last row
 

Hi Guys,

Im trying to find the last row of data in column a, then go across to
column e and sum whats in that column...

Any ideas...???

Thanks

D


*** Sent via Developersdex http://www.developersdex.com ***

Graham Whitehead

Last row
 
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.

"Darin Kramer" wrote in message
...

Hi Guys,

Im trying to find the last row of data in column a, then go across to
column e and sum whats in that column...

Any ideas...???

Thanks

D


*** Sent via Developersdex http://www.developersdex.com ***




Norman Jones

Last row
 
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
'<<=============


---
Regards,
Norman



"Darin Kramer" wrote in message
...

Hi Guys,

Im trying to find the last row of data in column a, then go across to
column e and sum whats in that column...

Any ideas...???

Thanks

D


*** Sent via Developersdex http://www.developersdex.com ***





All times are GMT +1. The time now is 07:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com