Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
C C is offline
external usenet poster
 
Posts: 61
Default Change Selected cells references

Hi,

I have a large spreadsheet that I need to change a large amount of data from
a relative cell reference to an absolute cell reference. Is there a way for
me to select the cells at one time and change the reference?

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default Change Selected cells references

Hi,
you can use replace, CTRL + H, find what i.e. A1:A100, replace with
$A$1:$A$100, replace all

"C" wrote:

Hi,

I have a large spreadsheet that I need to change a large amount of data from
a relative cell reference to an absolute cell reference. Is there a way for
me to select the cells at one time and change the reference?

Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Change Selected cells references

Take your pick from these.

Sub Absolute()
Dim Cell As Range
For Each Cell In Selection
If Cell.HasFormula Then
Cell.Formula = Application.ConvertFormula _
(Cell.Formula, xlA1, xlA1, xlAbsolute)
End If
Next
End Sub

Sub AbsoluteRow()
Dim Cell As Range
For Each Cell In Selection
If Cell.HasFormula Then
Cell.Formula = Application.ConvertFormula _
(Cell.Formula, xlA1, xlA1, xlAbsRowRelColumn)
End If
Next
End Sub

Sub AbsoluteCol()
Dim Cell As Range
For Each Cell In Selection
If Cell.HasFormula Then
Cell.Formula = Application.ConvertFormula _
(Cell.Formula, xlA1, xlA1, xlRelRowAbsColumn)
End If
Next
End Sub

Sub Relative()
Dim Cell As Range
For Each Cell In Selection
If Cell.HasFormula Then
Cell.Formula = Application.ConvertFormula _
(Cell.Formula, xlA1, xlA1, xlRelative)
End If
Next
End Sub


Gord Dibben MS Excel MVP


On Fri, 12 Mar 2010 08:31:01 -0800, C wrote:

Hi,

I have a large spreadsheet that I need to change a large amount of data from
a relative cell reference to an absolute cell reference. Is there a way for
me to select the cells at one time and change the reference?

Thanks in advance.


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
Change relative to absolute references in a block of cells Giles Excel Discussion (Misc queries) 3 January 27th 09 02:19 PM
How do i change the color of the selected cells? prash Excel Discussion (Misc queries) 0 August 27th 07 07:44 PM
Can a workbook be locked against change to cells containing references to other files? az94 Excel Worksheet Functions 0 March 28th 06 08:26 PM
How do I lock selected cells, so only I can change them? Robert Excel Worksheet Functions 3 February 27th 06 04:41 PM
covert only cell references in selected cells into value leaving the existingcell formula al007 Excel Programming 16 January 21st 06 02:29 AM


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