Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default 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

Reply
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
Relative and absolute hyperlinks Musette New Users to Excel 2 October 4th 07 06:47 AM
name range from absolute to relative WCO Excel Worksheet Functions 9 December 13th 06 08:13 PM
Mix of relative and absolute? M John Excel Programming 4 April 27th 06 04:24 PM
changing relative to absolute Paul Excel Discussion (Misc queries) 2 April 20th 06 08:09 PM
Chg Absolute to Relative Adresmith[_8_] Excel Programming 1 October 29th 04 07:23 PM


All times are GMT +1. The time now is 07:24 AM.

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

About Us

"It's about Microsoft Excel"