Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Absolute references

sub ProcessData()
for each cell in Range("A1:A5000")
s = cell.formula
s1 = Application.ConvertFormula( _
formula:=s, _
fromReferenceStyle:=xlA1, _
toReferenceStyle:=xlA1, _
ToAbsolute:=xlAbsolute)
cell.Formula = s1
Next
End Sub

Change A1:A5000 to the range you want to process.
Test this on a copy of your data and make sure it does what you want.

--
Regards,
Tom Ogilvy


"Johan" wrote:

I would like to create a macro that changes a formula in a cell to an
absolute reference. Since I have a list of 5000 rows I want the VBA script to
choose below cell after having changed the first one. I'm not into VBA so
please keep answers on a dummy level.

Greatful to answers / Johan

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
convert relative cell references to absolute cell references via amacro? Dave F[_2_] Excel Discussion (Misc queries) 1 May 15th 08 04:43 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 References Dan Beard Excel Discussion (Misc queries) 3 October 16th 07 03:20 AM
Absolute references Johan Excel Programming 0 March 16th 06 09:08 PM
Absolute references BWGames Excel Programming 1 December 31st 03 10:52 AM


All times are GMT +1. The time now is 09:11 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"