Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Module to make all absolute references relative

I'm using absolute references to allow a set of formulas to be copied across
and down a spreadsheet with only certain values changing relatively. After
the formulas are in place, I need all absolute references to be returned to
relative references so the sheet will still function when it is reformatted,
parts added/removed etc...

Couldn't a simple module be written to remove all "$" characters from cells
in the sheet?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Module to make all absolute references relative

Probably just as quick to do a manual search & replace-all (ctrl-h) in Excel
as would be to find and run a macro. Or record a macro while you do that.

Regards,
Peter T


"Pro_D Mike" wrote in message
...
I'm using absolute references to allow a set of formulas to be copied

across
and down a spreadsheet with only certain values changing relatively. After
the formulas are in place, I need all absolute references to be returned

to
relative references so the sheet will still function when it is

reformatted,
parts added/removed etc...

Couldn't a simple module be written to remove all "$" characters from

cells
in the sheet?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Module to make all absolute references relative

Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, xlA1, ,
xlRelative)
End If
Next cell


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Pro_D Mike" wrote in message
...
I'm using absolute references to allow a set of formulas to be copied

across
and down a spreadsheet with only certain values changing relatively. After
the formulas are in place, I need all absolute references to be returned

to
relative references so the sheet will still function when it is

reformatted,
parts added/removed etc...

Couldn't a simple module be written to remove all "$" characters from

cells
in the sheet?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Module to make all absolute references relative

Thanks, that's great.

"Bob Phillips" wrote:

Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.HasFormula Then
cell.Formula = Application.ConvertFormula(cell.Formula, xlA1, ,
xlRelative)
End If
Next cell


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Pro_D Mike" wrote in message
...
I'm using absolute references to allow a set of formulas to be copied

across
and down a spreadsheet with only certain values changing relatively. After
the formulas are in place, I need all absolute references to be returned

to
relative references so the sheet will still function when it is

reformatted,
parts added/removed etc...

Couldn't a simple module be written to remove all "$" characters from

cells
in the sheet?




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
absolute & relative references zzulu4 Excel Discussion (Misc queries) 2 April 1st 09 05:54 PM
Help with converting a block of cells with Absolute and mixed references to relative references Vulcan Excel Worksheet Functions 3 December 13th 07 11:43 PM
Absolute / Relative References Tim Mills Excel Programming 2 July 25th 05 12:32 PM
Check relative / absolute references oli Excel Programming 1 July 5th 05 01:22 PM
Absolute vs. Relative Cell References ChrisR Excel Programming 2 February 9th 05 11:16 PM


All times are GMT +1. The time now is 09:39 AM.

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"