Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default is there a way to search for a specific value in a formula?


Hi

I got a lot of named ranges which refer to a specific workbook however
the values.

for example i have a names range with the following value
='[test.xls]Information'!$C$123"

is there a way to go through all the ranges and delete only the
reference to the test workbook?


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=555964

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default is there a way to search for a specific value in a formula?

Sub tester()
Dim wb As Workbook
Dim nName As Name

Set wb = Workbooks("test.xls")

For Each nName In Names
If nName.RefersToRange.Parent.Parent Is wb Then
nName.Delete
End If
Next nName

End Sub

HTH
--
AP

"funkymonkUK" a
écrit dans le message de news:
...

Hi

I got a lot of named ranges which refer to a specific workbook however
the values.

for example i have a names range with the following value
='[test.xls]Information'!$C$123"

is there a way to go through all the ranges and delete only the
reference to the test workbook?


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile:
http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=555964



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default is there a way to search for a specific value in a formula?


if i am correct this will actually delete the named range which is not
exactly what i was looking for as the ranges are used for calculations.


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=555964

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default is there a way to search for a specific value in a formula?

You mean your named range should refer to Information'!$C$123 insetead of
{test.xls]Information!$C$123

Am i right?

Cheers,
--
AP

"funkymonkUK" a
écrit dans le message de news:
...

if i am correct this will actually delete the named range which is not
exactly what i was looking for as the ranges are used for calculations.


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile:
http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=555964



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default is there a way to search for a specific value in a formula?


that is correct what i tried was finding and replacing all "=" with " =
to make excel think I was working with a text and then copy it over t
the other workbook and again finding all " =" with "=" to change i
back into a formula however it still seem to bring some of the link
over

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=55596



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default is there a way to search for a specific value in a formula?


Good Morning FunkyMonkUK,

Have you tried doing:

Edit -- Find -- Replace "[test.xls]" with "" -- Replace All ?

Hopefully I haven't missed your point.

Sincerely,


Isaac Maycott

--
I Maycott
-----------------------------------------------------------------------
I Maycotte's Profile: http://www.excelforum.com/member.php...fo&userid=3560
View this thread: http://www.excelforum.com/showthread.php?threadid=55596

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default is there a way to search for a specific value in a formula?

Sub tester()
Dim wb As Workbook
Dim nName As Name

Set wb = Workbooks("test.xls")

For Each nName In Names
If nName.RefersToRange.Parent.Parent Is wb Then
nName.RefersTo = _
"=" & _
ActiveSheet.Name & _
"!" & _
nName.RefersToRange.Address
End If
Next nName

End Sub

Cheers,
--
AP

"funkymonkUK" a
écrit dans le message de news:
...

that is correct what i tried was finding and replacing all "=" with " ="
to make excel think I was working with a text and then copy it over to
the other workbook and again finding all " =" with "=" to change it
back into a formula however it still seem to bring some of the links
over.


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile:
http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=555964



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default is there a way to search for a specific value in a formula?


i tried that with no luck i think you can see where i am coming from

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=55596

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
Nested formula to search a text string and return specific text Barbie Excel Worksheet Functions 10 February 21st 09 07:40 AM
Formula to Search one specific cell on another sheet. Dan C. Excel Discussion (Misc queries) 2 January 27th 09 06:49 AM
Extract specific value using SEARCH FORMULA Dinesh Excel Worksheet Functions 3 March 2nd 07 06:17 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Ed[_18_] Excel Programming 4 May 20th 04 02:08 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Frank Kabel Excel Programming 0 May 19th 04 08:11 PM


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