LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Replace a spreadsheets named cells/ranges with exact cell address!

I have a named range (A1:A6) which is called MyRange. Lets say each cell is
populated with a number A1 = 1, A2 = 2. A3 = 3 etc. In the row (B1:B6)
beneath it, I have entered =MyRange in each cell. As such the values in
B1:B6 mirror those in A1:A6. That is, even though I use MyRange in each cell
in Row B, Excel knows which cell to pull from in rowA to correctly populate
the cells in Row B.

Now If I use the Macro below to delete the named ranges I get the following
range in each of the RowB cells =A1:A6. Once again Excel knows which cell to
pull from in Row A to populate cells in Row B.

My question is how can I adjust the macro below so that it deletes the named
range but replaces it with eact cell address that is being pulled into Row B.
So in B2 I do not want to see =A1:A6 I want to see =A2.

What I am looking to do here is replace a spreadsheets named cells/ranges
with exact cell address.

In fact I think Microsoft should proivde switch in Excel to allow the user
to do this!!!!

Sub DenameFormulas()
'This code replaces named cells with actuall address behind them
Dim Cell As Range
ActiveSheet.TransitionFormEntry = True
For Each Cell In Cells.SpecialCells(xlFormulas)
Cell.Formula = Cell.Formula
Next
ActiveSheet.TransitionFormEntry = False
End Sub

Thanks
 
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
Named Cells (Ranges) Derek Hart Excel Discussion (Misc queries) 4 November 3rd 08 07:59 AM
Unable to replace cell references with Named ranges lhim2 Excel Discussion (Misc queries) 0 January 28th 08 04:13 PM
Extracting or Referencing named cells in multiple spreadsheets Bonehead Excel Discussion (Misc queries) 3 November 27th 06 07:18 PM
Replace a spreadsheets named cells/ranges with exact cell address. David McRitchie Excel Discussion (Misc queries) 0 September 28th 05 08:59 PM
Testing for named cells (i.e., ranges) John Wirt[_5_] Excel Programming 3 January 25th 05 10:07 AM


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