![]() |
Absolute to Relative
The macro below returns a forumula that has an address that is absolute. How
would I force the macro to return an address that is relative (without the dollar signs)? ActiveCell.Formula = "=" & ActiveCell.Offset(0, -1).Address & "-4" -- l-hawk |
Absolute to Relative
ActiveCell.Formula = "=" & ActiveCell.Offset(0, -1).Address(false,false) &
"-4" -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "hawki" wrote in message ... The macro below returns a forumula that has an address that is absolute. How would I force the macro to return an address that is relative (without the dollar signs)? ActiveCell.Formula = "=" & ActiveCell.Offset(0, -1).Address & "-4" -- l-hawk |
Absolute to Relative
ActiveCell.Formula = "=" & ActiveCell.Offset(0, -1).Address(0,0) & "-4"
Put your cursor on the word .Address (when you're in the VBE) and hit F1. You'll see a couple of options for rowabsolute and columnabsolute. (0,0) is the same as (false,false) which is the same as: (rowabsolute:=false,columnabsolute:=false) hawki wrote: The macro below returns a forumula that has an address that is absolute. How would I force the macro to return an address that is relative (without the dollar signs)? ActiveCell.Formula = "=" & ActiveCell.Offset(0, -1).Address & "-4" -- l-hawk -- Dave Peterson |
Absolute to Relative
Thanks!
-- l-hawk "Dave Peterson" wrote: ActiveCell.Formula = "=" & ActiveCell.Offset(0, -1).Address(0,0) & "-4" Put your cursor on the word .Address (when you're in the VBE) and hit F1. You'll see a couple of options for rowabsolute and columnabsolute. (0,0) is the same as (false,false) which is the same as: (rowabsolute:=false,columnabsolute:=false) hawki wrote: The macro below returns a forumula that has an address that is absolute. How would I force the macro to return an address that is relative (without the dollar signs)? ActiveCell.Formula = "=" & ActiveCell.Offset(0, -1).Address & "-4" -- l-hawk -- Dave Peterson |
All times are GMT +1. The time now is 08:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com