Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm setting formulas in cells in VBA using R1C1
For example: In Excel: A1 = Sum(A2:A10) 'Assume RowStart = 2 RowEnd =10 ColNum =1 In VBA: 'Assume RowStart = 2 RowEnd =10 ColNum =1 Cells(1,1) = "=Sum(R" & RowStart & "C" & ColNum & ":R" & RowEnd & "C" & ColNum & ")" The resulting Excel formula in A1: =Sum($A$2:$A$10) This works fine however I would like to omit the anchors should end users need to change rows/columns around at a later date. So that ending result would be A1=Sum(A2:A10) Any suggestions? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Eliminate #N/A in Vlookup formulas | Excel Worksheet Functions | |||
R1C1 - how can I permanently undo this setting in Excel? | Setting up and Configuration of Excel | |||
Using Variables in R1C1 formulas | Excel Programming | |||
Setting Range Name using R1C1 | Excel Programming | |||
Is there a way to eliminate specific cells from formulas? | New Users to Excel |