LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Macro creates formula with $ absolute. I want to drop the $

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 $?





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
F4 no longer automatically creates absolute reference molla Excel Worksheet Functions 2 June 5th 10 01:23 AM
Macro creates two graphs instead of one? et10yl Excel Programming 1 October 19th 06 07:32 PM
VBA Code, My excel macro creates the charts on top of each other osman[_5_] Excel Programming 3 July 24th 06 09:53 PM
How to Rename a Blank Sheet that a macro Creates Darin Kramer Excel Programming 3 December 6th 04 12:55 PM
Macro that creates a directory but... Andy Excel Programming 7 November 28th 04 06:23 AM


All times are GMT +1. The time now is 09:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"