Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
The Hawk
 
Posts: n/a
Default Changing cell references in a Range to Absolute

Good Morning. I found a post that provided several macros to force cell
references in a range to Absolute and tried it. Two problems - I can't find
the post to respond to and when I applied it via VBA it changed the last two
columns correctly, but the first column no shows the formula and I can't seem
to change it back to the values as so:
NAME AVG HDCP
='[Blues-27-Apr-06.xls]Sub_Scores'!$B$5 32.0 1

The code used was:
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

Any help will be appreciated...
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Changing cell references in a Range to Absolute

You may be able to search Google Groups and find the original post and then
reply using Google.

But maybe this would work:

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



The Hawk wrote:

Good Morning. I found a post that provided several macros to force cell
references in a range to Absolute and tried it. Two problems - I can't find
the post to respond to and when I applied it via VBA it changed the last two
columns correctly, but the first column no shows the formula and I can't seem
to change it back to the values as so:
NAME AVG HDCP
='[Blues-27-Apr-06.xls]Sub_Scores'!$B$5 32.0 1

The code used was:
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

Any help will be appreciated...


--

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
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Cell Reference's when Pasting RadiantQuartzHeater Excel Discussion (Misc queries) 0 February 16th 06 08:55 AM
Changing cell references Tracey Excel Discussion (Misc queries) 4 January 4th 05 08:05 PM
changing the value of each cell in a range by a certain percentage Aaron Excel Discussion (Misc queries) 5 December 15th 04 10:30 PM
Changing Cell References in Formulas Pat Excel Worksheet Functions 2 December 15th 04 05:29 PM


All times are GMT +1. The time now is 05:21 PM.

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"