Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need interpretation
Sub test()
Range("A1").End(xlDown).Offset(1, 0).Select ActiveCell.FormulaR1C1 = "=SUM(R[-7]C:R[-1]C)" <<See Note End Sub First please verbalize the "=SUM(R[-7]C:R[-1]C)" syntax, I can't get it.. <<Note : this line created separately using Macro recorder with Cell A8 active at the time. It appears to be an absolute address (with the 7 in it). How can I change the "=SUM(R[-7]C:R[-1]C)" portion on code to always run from one cell up to the top row of my column? Thanks in Advance,, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need interpretation
it means to sum in the current column -7 cells up from this cell down to -1
cell from this cell (this cell being the cell with the formula). To sum from the first cell in the column of the active cell to one cell above the active cell, you would use ActiveCell.FormulaR1C1 = "=SUM(R1C:R[-1]C)" R1C is absolute R1 this column R[-1]C is the cell above the cell with the formula (this is relative to row) -- Regards, Tom Ogilvy "JMay" wrote in message news:iBqsb.5942$5e.491@lakeread06... Sub test() Range("A1").End(xlDown).Offset(1, 0).Select ActiveCell.FormulaR1C1 = "=SUM(R[-7]C:R[-1]C)" <<See Note End Sub First please verbalize the "=SUM(R[-7]C:R[-1]C)" syntax, I can't get it.. <<Note : this line created separately using Macro recorder with Cell A8 active at the time. It appears to be an absolute address (with the 7 in it). How can I change the "=SUM(R[-7]C:R[-1]C)" portion on code to always run from one cell up to the top row of my column? Thanks in Advance,, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need interpretation
Thanks Tom; I've printed your comments in order to study.
JMay "Tom Ogilvy" wrote in message ... it means to sum in the current column -7 cells up from this cell down to -1 cell from this cell (this cell being the cell with the formula). To sum from the first cell in the column of the active cell to one cell above the active cell, you would use ActiveCell.FormulaR1C1 = "=SUM(R1C:R[-1]C)" R1C is absolute R1 this column R[-1]C is the cell above the cell with the formula (this is relative to row) -- Regards, Tom Ogilvy "JMay" wrote in message news:iBqsb.5942$5e.491@lakeread06... Sub test() Range("A1").End(xlDown).Offset(1, 0).Select ActiveCell.FormulaR1C1 = "=SUM(R[-7]C:R[-1]C)" <<See Note End Sub First please verbalize the "=SUM(R[-7]C:R[-1]C)" syntax, I can't get it.. <<Note : this line created separately using Macro recorder with Cell A8 active at the time. It appears to be an absolute address (with the 7 in it). How can I change the "=SUM(R[-7]C:R[-1]C)" portion on code to always run from one cell up to the top row of my column? Thanks in Advance,, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dsum formula interpretation | Excel Worksheet Functions | |||
Interpretation of a piece of code | Excel Discussion (Misc queries) | |||
Interpretation for: =INDEX(MATCH(1 <--one | Excel Discussion (Misc queries) | |||
Interpretation | Excel Discussion (Misc queries) | |||
value interpretation | Excel Programming |