Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Column Subtotal Question
I have a spreadsheet that I need to add a column subtotal for column C and
column D. the number of rows will vary from one run to the next. the other issue I have is that all rows with a value in column D are listed (by sort) below all rows with a value in column C. I can add subtotals, but I do not know how to set the range to be dynamic. Also, I need the subtotals to be 2 rows below the last row with a value in column D. I am stumped! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Column Subtotal Question
I need the subtotals to be 2 rows below the last row with a value in
column D. I am stumped! You would need to have the value set by a macro -- Don Guillett Microsoft MVP Excel SalesAid Software "brentm" wrote in message ... I have a spreadsheet that I need to add a column subtotal for column C and column D. the number of rows will vary from one run to the next. the other issue I have is that all rows with a value in column D are listed (by sort) below all rows with a value in column C. I can add subtotals, but I do not know how to set the range to be dynamic. Also, I need the subtotals to be 2 rows below the last row with a value in column D. I am stumped! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Column Subtotal Question
Something like this:
Dim lastrow as Long lastrow = .Cells(.Rows.Count, "C").End(xlUp).Row .Cells(lastrow, "C").Activate ActiveCell.FormulaR1C1 = "=sum(r6c:r[-1]c)" HTH, Ryan--- -- RyGuy "brentm" wrote: I have a spreadsheet that I need to add a column subtotal for column C and column D. the number of rows will vary from one run to the next. the other issue I have is that all rows with a value in column D are listed (by sort) below all rows with a value in column C. I can add subtotals, but I do not know how to set the range to be dynamic. Also, I need the subtotals to be 2 rows below the last row with a value in column D. I am stumped! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Subtotal question | Excel Worksheet Functions | |||
subtotal question? | Excel Worksheet Functions | |||
subtotal question | Excel Discussion (Misc queries) | |||
subtotal question | Excel Programming | |||
subtotal question | Excel Programming |