Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Named Range Cells vs. Absolute Cell Addresses

I have a workbook with many cells with names. Throughout
the workbook the references to these cells are made via
the "name".

I want to covert all of these references to the physical
cell address vs. the name. Are there any clever ways to
do this other than one by one?

I have a worksheet that contains all the named cells in
the workbook and their physical address. I tried writing a
macro that did a find and replace. The find worked but the
replace did not. It does work manually.. but there are too
many to convert manually.

Also, are there any utilities that will provide a list of
all cells dependent upon a given cell.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Named Range Cells vs. Absolute Cell Addresses

This is a macro I wrote to "de-name" formulas in a selected range several
years ago. By de-name I mean replace all names with actual cell addresses,
not particular names. Frankly I haven't needed it much and I never tested
it much. It seems to work in the simple cases I've used it and you're
welcome to try it but if it breaks down in particular circumstances I
wouldn't be surprised.

--
Jim Rech
Excel MVP

Sub DenameFormulas()
Dim Cell As Range
ActiveSheet.TransitionFormEntry = True
With Selection
If .Areas.Count 1 Then
For Each Cell In .SpecialCells(xlFormulas)
Cell.Formula = Cell.Formula
Next
Else
Selection.Formula = Selection.Formula
End If
End With
ActiveSheet.TransitionFormEntry = False
End Sub


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Named Range Cells vs. Absolute Cell Addresses

If you want to do all at once. Be careful that it doesn't replace names you
don't want replaced.

Sub ReplaceNamesWithAddress()
For Each ws In Worksheets
ws.Select
For Each n In ActiveWorkbook.Names
x = Right(n.RefersTo, Len(n.RefersTo) - 1)
Cells.Replace what:=n.Name, replacement:=x, _
Lookat:=xlPart
Next n
Next ws
Sheets("sheet1").Select
End Sub

--
Don Guillett
SalesAid Software

"Mike Short" wrote in message
...
I have a workbook with many cells with names. Throughout
the workbook the references to these cells are made via
the "name".

I want to covert all of these references to the physical
cell address vs. the name. Are there any clever ways to
do this other than one by one?

I have a worksheet that contains all the named cells in
the workbook and their physical address. I tried writing a
macro that did a find and replace. The find worked but the
replace did not. It does work manually.. but there are too
many to convert manually.

Also, are there any utilities that will provide a list of
all cells dependent upon a given cell.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Named Range Cells vs. Absolute Cell Addresses

This will do it automatically for all workbook names over all sheets.

Sub ReplaceName()
Dim nme As Name
Dim sh As Worksheet
For Each nme In ActiveWorkbook.Names
For Each sh In ActiveWorkbook.Worksheets
sh.Cells.Replace _
What:=nme.Name, _
replacement:=Replace(Names(nme.Name).RefersTo, "=", ""), _
LookAt:=xlPart
Next sh
Next nme
End Sub


It will fail if you have worksheet names though.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Don Guillett" wrote in message
...
Does this help?

Sub ReplaceName()
Cells.Replace What:="badname", _
Replacement:="$G$4", LookAt:=xlPart
End Sub

--
Don Guillett
SalesAid Software

"Mike Short" wrote in message
...
I have a workbook with many cells with names. Throughout
the workbook the references to these cells are made via
the "name".

I want to covert all of these references to the physical
cell address vs. the name. Are there any clever ways to
do this other than one by one?

I have a worksheet that contains all the named cells in
the workbook and their physical address. I tried writing a
macro that did a find and replace. The find worked but the
replace did not. It does work manually.. but there are too
many to convert manually.

Also, are there any utilities that will provide a list of
all cells dependent upon a given cell.








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
Paste to next empty cell in named range of cells Sully Excel Discussion (Misc queries) 3 March 4th 10 05:23 PM
RANGE addresses. Getting from other cells. thomas Excel Worksheet Functions 3 July 17th 08 12:18 PM
COUNTIF absolute value of cells in a range are 0 Dave F Excel Discussion (Misc queries) 8 January 31st 07 05:56 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
How do I get absolute values for a range of cells? Terry Excel Discussion (Misc queries) 3 March 2nd 05 03:54 PM


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