Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
RAP RAP is offline
external usenet poster
 
Posts: 49
Default Change linked cell reference to absolute

Hello,
I've got too many cells to go to, click in the formula bar and hit F4 to
change the formula reference to absolute.
I'm looking for a way to select my cells and run a macro that will take the
cells and make all linked cell references absolute.
Ex: in cell D4, the formula is "=Jan!$D15" , "Jan" being another page in the
workbook. I need like the formula to change to "=Jan!$D$15"

I have the same problem with linked cells having a formula and multiple cell
references in the formula.
Ex: in cell E4, the formula is "=IF(Jan!$F15=Jan!$A$34,Jan!$E15,0)" Again,
I need all formulas referenced to be absolute.

Any help is much appreciated.

Thanks,
Randy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Change linked cell reference to absolute

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



--

HTH

RP
(remove nothere from the email address if mailing direct)


"RAP" wrote in message
...
Hello,
I've got too many cells to go to, click in the formula bar and hit F4 to
change the formula reference to absolute.
I'm looking for a way to select my cells and run a macro that will take

the
cells and make all linked cell references absolute.
Ex: in cell D4, the formula is "=Jan!$D15" , "Jan" being another page in

the
workbook. I need like the formula to change to "=Jan!$D$15"

I have the same problem with linked cells having a formula and multiple

cell
references in the formula.
Ex: in cell E4, the formula is "=IF(Jan!$F15=Jan!$A$34,Jan!$E15,0)"

Again,
I need all formulas referenced to be absolute.

Any help is much appreciated.

Thanks,
Randy



  #3   Report Post  
Posted to microsoft.public.excel.programming
RAP RAP is offline
external usenet poster
 
Posts: 49
Default Change linked cell reference to absolute

Bob,
As usual, it worked like a charm. Thank you so much for the help. It has
already saved me a "ton" on time. I wasn't aware of the "ConvertFormula"
method. It's exactly what I was looking for.

Also, I found a treasure trove of examples in the VBHelp. "Examples of
Commonly used formulas" Good reading.
Thanks again,
Randy

"Bob Phillips" wrote:

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



--

HTH

RP
(remove nothere from the email address if mailing direct)


"RAP" wrote in message
...
Hello,
I've got too many cells to go to, click in the formula bar and hit F4 to
change the formula reference to absolute.
I'm looking for a way to select my cells and run a macro that will take

the
cells and make all linked cell references absolute.
Ex: in cell D4, the formula is "=Jan!$D15" , "Jan" being another page in

the
workbook. I need like the formula to change to "=Jan!$D$15"

I have the same problem with linked cells having a formula and multiple

cell
references in the formula.
Ex: in cell E4, the formula is "=IF(Jan!$F15=Jan!$A$34,Jan!$E15,0)"

Again,
I need all formulas referenced to be absolute.

Any help is much appreciated.

Thanks,
Randy




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Change linked cell reference to absolute

Hi Randy,

Yeah, that is quite good. I will make a note of it and offer it in future
appropriate responses :-)

Thanks

Bob


"RAP" wrote in message
...
Bob,
As usual, it worked like a charm. Thank you so much for the help. It has
already saved me a "ton" on time. I wasn't aware of the "ConvertFormula"
method. It's exactly what I was looking for.

Also, I found a treasure trove of examples in the VBHelp. "Examples of
Commonly used formulas" Good reading.
Thanks again,
Randy

"Bob Phillips" wrote:

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



--

HTH

RP
(remove nothere from the email address if mailing direct)


"RAP" wrote in message
...
Hello,
I've got too many cells to go to, click in the formula bar and hit F4

to
change the formula reference to absolute.
I'm looking for a way to select my cells and run a macro that will

take
the
cells and make all linked cell references absolute.
Ex: in cell D4, the formula is "=Jan!$D15" , "Jan" being another page

in
the
workbook. I need like the formula to change to "=Jan!$D$15"

I have the same problem with linked cells having a formula and

multiple
cell
references in the formula.
Ex: in cell E4, the formula is "=IF(Jan!$F15=Jan!$A$34,Jan!$E15,0)"

Again,
I need all formulas referenced to be absolute.

Any help is much appreciated.

Thanks,
Randy






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Change linked cell reference to absolute

Is it just a case of copy and pasting in VB? This is what I've done and I get
a syntax error at cell.formula = (I'm using 2003)

Thanks
bec

"Bob Phillips" wrote:

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



--

HTH

RP
(remove nothere from the email address if mailing direct)


"RAP" wrote in message
...
Hello,
I've got too many cells to go to, click in the formula bar and hit F4 to
change the formula reference to absolute.
I'm looking for a way to select my cells and run a macro that will take

the
cells and make all linked cell references absolute.
Ex: in cell D4, the formula is "=Jan!$D15" , "Jan" being another page in

the
workbook. I need like the formula to change to "=Jan!$D$15"

I have the same problem with linked cells having a formula and multiple

cell
references in the formula.
Ex: in cell E4, the formula is "=IF(Jan!$F15=Jan!$A$34,Jan!$E15,0)"

Again,
I need all formulas referenced to be absolute.

Any help is much appreciated.

Thanks,
Randy






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Change linked cell reference to absolute

I'm betting that you typed Bob's suggestion into the VBE. Instead, try
copy|pasting his code.

If you did copy|paste, then try copy|paste once more. Something bad happened.
Bob's code works fine for me.

If this doesn't help, post the code you're using.



AussieBec wrote:

Is it just a case of copy and pasting in VB? This is what I've done and I get
a syntax error at cell.formula = (I'm using 2003)

Thanks
bec

"Bob Phillips" wrote:

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



--

HTH

RP
(remove nothere from the email address if mailing direct)


"RAP" wrote in message
...
Hello,
I've got too many cells to go to, click in the formula bar and hit F4 to
change the formula reference to absolute.
I'm looking for a way to select my cells and run a macro that will take

the
cells and make all linked cell references absolute.
Ex: in cell D4, the formula is "=Jan!$D15" , "Jan" being another page in

the
workbook. I need like the formula to change to "=Jan!$D$15"

I have the same problem with linked cells having a formula and multiple

cell
references in the formula.
Ex: in cell E4, the formula is "=IF(Jan!$F15=Jan!$A$34,Jan!$E15,0)"

Again,
I need all formulas referenced to be absolute.

Any help is much appreciated.

Thanks,
Randy





--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Change linked cell reference to absolute

Thanks, I repasted and made sure I took out any hidden text before each line
and it's worked a treat. If at first you don't succeed try try again.

Thanks
Bec

"Dave Peterson" wrote:

I'm betting that you typed Bob's suggestion into the VBE. Instead, try
copy|pasting his code.

If you did copy|paste, then try copy|paste once more. Something bad happened.
Bob's code works fine for me.

If this doesn't help, post the code you're using.



AussieBec wrote:

Is it just a case of copy and pasting in VB? This is what I've done and I get
a syntax error at cell.formula = (I'm using 2003)

Thanks
bec

"Bob Phillips" wrote:

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



--

HTH

RP
(remove nothere from the email address if mailing direct)


"RAP" wrote in message
...
Hello,
I've got too many cells to go to, click in the formula bar and hit F4 to
change the formula reference to absolute.
I'm looking for a way to select my cells and run a macro that will take
the
cells and make all linked cell references absolute.
Ex: in cell D4, the formula is "=Jan!$D15" , "Jan" being another page in
the
workbook. I need like the formula to change to "=Jan!$D$15"

I have the same problem with linked cells having a formula and multiple
cell
references in the formula.
Ex: in cell E4, the formula is "=IF(Jan!$F15=Jan!$A$34,Jan!$E15,0)"
Again,
I need all formulas referenced to be absolute.

Any help is much appreciated.

Thanks,
Randy




--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Change linked cell reference to absolute

A good rule for life, too <bg.

AussieBec wrote:

Thanks, I repasted and made sure I took out any hidden text before each line
and it's worked a treat. If at first you don't succeed try try again.

Thanks
Bec

"Dave Peterson" wrote:

I'm betting that you typed Bob's suggestion into the VBE. Instead, try
copy|pasting his code.

If you did copy|paste, then try copy|paste once more. Something bad happened.
Bob's code works fine for me.

If this doesn't help, post the code you're using.



AussieBec wrote:

Is it just a case of copy and pasting in VB? This is what I've done and I get
a syntax error at cell.formula = (I'm using 2003)

Thanks
bec

"Bob Phillips" wrote:

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



--

HTH

RP
(remove nothere from the email address if mailing direct)


"RAP" wrote in message
...
Hello,
I've got too many cells to go to, click in the formula bar and hit F4 to
change the formula reference to absolute.
I'm looking for a way to select my cells and run a macro that will take
the
cells and make all linked cell references absolute.
Ex: in cell D4, the formula is "=Jan!$D15" , "Jan" being another page in
the
workbook. I need like the formula to change to "=Jan!$D$15"

I have the same problem with linked cells having a formula and multiple
cell
references in the formula.
Ex: in cell E4, the formula is "=IF(Jan!$F15=Jan!$A$34,Jan!$E15,0)"
Again,
I need all formulas referenced to be absolute.

Any help is much appreciated.

Thanks,
Randy




--

Dave Peterson


--

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
Shortcut to change change cell reference to Absolute reference? richk Excel Worksheet Functions 12 December 5th 09 12:24 AM
Change a cell reference from relative to absolute Fred Holmes Excel Discussion (Misc queries) 2 June 4th 09 02:03 AM
change change cell reference to Absolute reference art Excel Discussion (Misc queries) 5 March 13th 08 02:41 AM
How do I change the default cell reference from absolute to relati JZing Setting up and Configuration of Excel 3 July 19th 06 01:03 AM
How do I change a cell from absolute reference to relative referen simonsez Excel Discussion (Misc queries) 1 May 17th 05 08:39 PM


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