Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
NEWBIE: How to sum cells using VBA
Brand new and trying my best at VBA ... in advance, thank you for your
help! My worksheets will have a different number of rows each time they are generated. Trying to show the sum for Column C, Column D and Column E (individually). I can write the code to show the sum, but it requires that I have the cursor in the specific cell. Want to be able to run the macro, have it find the last row with numbers, then jump down one row and show the sum for each column. --Chris |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
NEWBIE: How to sum cells using VBA
As an example
iLastRow = Cells(Rows.Count,"D").End(xlUp).Row Cells(iLastRow+1,"D").Formula = "=SUM(D1:D" & iLastRow & ")" -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "chuber" wrote in message oups.com... Brand new and trying my best at VBA ... in advance, thank you for your help! My worksheets will have a different number of rows each time they are generated. Trying to show the sum for Column C, Column D and Column E (individually). I can write the code to show the sum, but it requires that I have the cursor in the specific cell. Want to be able to run the macro, have it find the last row with numbers, then jump down one row and show the sum for each column. --Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Newbie Date cells so most recent is on top | Excel Worksheet Functions | |||
Newbie Q: Range from two cells | Excel Programming | |||
Newbie needs help with incrementing a series of cells | Excel Worksheet Functions | |||
Newbie : Sum Cells Part 2 | Excel Programming | |||
Newbie : How to sum cells via VBA code. | Excel Programming |