PC Review


Reply
Thread Tools Rate Thread

Change Selected cells references

 
 
C
Guest
Posts: n/a
 
      12th Mar 2010
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 With Quote
 
 
 
 
Eduardo
Guest
Posts: n/a
 
      12th Mar 2010
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.

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      12th Mar 2010
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 <(E-Mail Removed)> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change relative to absolute references in a block of cells Giles Microsoft Excel Misc 3 27th Jan 2009 02:19 PM
Import data using QueryTable somehow change sheet cells references =?Utf-8?B?SmFja0NhbGk=?= Microsoft Excel Programming 2 6th Apr 2007 05:34 PM
Can a workbook be locked against change to cells containing references to other files? az94 Microsoft Excel Worksheet Functions 0 28th Mar 2006 08:26 PM
How do I lock selected cells, so only I can change them? =?Utf-8?B?Um9iZXJ0?= Microsoft Excel Worksheet Functions 3 27th Feb 2006 04:41 PM
covert only cell references in selected cells into value leaving the existingcell formula al007 Microsoft Excel Programming 16 21st Jan 2006 02:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:55 AM.