Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am attempting to do a subtotal based column A without invoking the
subtotal function. Pls review the code below and correct the msitakes. Dim z As Long Dim TOT As String z = 3 Range("C2").FormulaR1C1 = "=RC[-1]" TOT = Range("C2").Value Do While Range("A" & z) < "" If Range("A" & z).Value = Range("A" & z - 1).Value Then 'Range("C" & z - 1).FormulaR1C1 = "=RC[-1]+R[-1]C" Range("C" & z).Select ActiveCell.FormulaR1C1 = "=RC[-1]+ TOT" TOT = "=RC[-1]" + TOT Range("C" & z - 1).FormulaR1C1 = 0 Else Range("A" & z).Select ActiveCell.FormulaR1C1 = 0 End If z = z + 1 Loop |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sort macro, subtotal and add lines after subtotal | Excel Discussion (Misc queries) | |||
Macro add row and subtotal | Excel Discussion (Misc queries) | |||
macro excel subtotal in subtotal | Excel Discussion (Misc queries) | |||
Subtotal Macro | Excel Worksheet Functions | |||
Subtotal Format with Macro | Excel Programming |