ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   code for sum of sht with diff # of rows (https://www.excelbanter.com/excel-programming/367413-code-sum-sht-diff-rows.html)

Paulg[_7_]

code for sum of sht with diff # of rows
 

I need some code that will allow me to select the first blank cell a
the bottom of a column of numbers and calculate the sum. My problem i
that each spreadsheet I import has a different number of rows, and
don't know how to select the number of rows specific to tha
spreadsheet from the blank cell at the bottom. My previous macro
recorded the number of rows in the spreadsheet I recorded the macr
in.

Thanks

Pau

--
Paul
-----------------------------------------------------------------------
Paulg's Profile: http://www.excelforum.com/member.php...fo&userid=3607
View this thread: http://www.excelforum.com/showthread.php?threadid=56206


Die_Another_Day

code for sum of sht with diff # of rows
 
Range("A1").End(xlDown).Offset(1,0).Select 'Next Blank Cell in column a

HTH

Die_Another_Day
Paulg wrote:
I need some code that will allow me to select the first blank cell at
the bottom of a column of numbers and calculate the sum. My problem is
that each spreadsheet I import has a different number of rows, and I
don't know how to select the number of rows specific to that
spreadsheet from the blank cell at the bottom. My previous macros
recorded the number of rows in the spreadsheet I recorded the macro
in.

Thanks

Paul


--
Paulg
------------------------------------------------------------------------
Paulg's Profile: http://www.excelforum.com/member.php...o&userid=36077
View this thread: http://www.excelforum.com/showthread...hreadid=562060



Paulg[_8_]

code for sum of sht with diff # of rows
 

perfect! thank

--
Paul
-----------------------------------------------------------------------
Paulg's Profile: http://www.excelforum.com/member.php...fo&userid=3607
View this thread: http://www.excelforum.com/showthread.php?threadid=56206



All times are GMT +1. The time now is 04:55 AM.

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