#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default 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 ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default 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 ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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 ***



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"