Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've got this
LastRow = Cells(Rows.Count, "H").End(xlUp).Row Set rng = Range("H2:H" & LastRow) ActiveCell.Formula = "=SUBTOTAL(9," & rng.Address & ")" Which gives me this on the spreadsheet: =SUBTOTAL(9,$H$2:$H$1122) But I want this: =SUBTOTAL(9,H2:H1122) How do I stop the $? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveCell.Formula = "=SUBTOTAL(9," & rng.Address(0,0,xlA1,False) & ")"
-- Regards, Tom Ogilvy "Aaron" wrote: I've got this LastRow = Cells(Rows.Count, "H").End(xlUp).Row Set rng = Range("H2:H" & LastRow) ActiveCell.Formula = "=SUBTOTAL(9," & rng.Address & ")" Which gives me this on the spreadsheet: =SUBTOTAL(9,$H$2:$H$1122) But I want this: =SUBTOTAL(9,H2:H1122) How do I stop the $? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In Excel 2003 or earlier, as soon as you start recording, the macro
recorder toolbar floats out on the screen. Next to the Stop button, there's a toggle button for relative references - when toggled on, macro recorder will use relative references. In Excel 2007, this option appears in the Code group of the Developer tab. On Jul 7, 5:32 pm, Tom Ogilvy wrote: ActiveCell.Formula = "=SUBTOTAL(9," & rng.Address(0,0,xlA1,False) & ")" -- Regards, Tom Ogilvy "Aaron" wrote: I've got this LastRow = Cells(Rows.Count, "H").End(xlUp).Row Set rng = Range("H2:H" & LastRow) ActiveCell.Formula = "=SUBTOTAL(9," & rng.Address & ")" Which gives me this on the spreadsheet: =SUBTOTAL(9,$H$2:$H$1122) But I want this: =SUBTOTAL(9,H2:H1122) How do I stop the $?- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
F4 no longer automatically creates absolute reference | Excel Worksheet Functions | |||
Macro creates two graphs instead of one? | Excel Programming | |||
VBA Code, My excel macro creates the charts on top of each other | Excel Programming | |||
How to Rename a Blank Sheet that a macro Creates | Excel Programming | |||
Macro that creates a directory but... | Excel Programming |