help with Name Manager and bulk replacement for part of the 'Refers To' formula...

kbishop94

Active Member
Joined
Dec 5, 2016
Messages
458
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I need to shorten and remove part of the formula where its being directed to another workbook and just leave the specific cell reference for each one.

so instead of each named range being:

VBA Code:
='C:\Users\kbishop\Desktop\[Seatex Incident Log (64b) 3-8-24-16.xlsm]SUMY'!$A$3:$B$51

each one would only state:
VBA Code:
='SUMY'!$A$3:$B$51

I cant get this to work in the add on "Named Manager 4.5" Is this possible to do with this? Is there another way?

(I have over 800 of these to do and doing them one-by-one is not an option!)


Capture12.JPG

It looks like this is feature that I need that would do what I need it to do...
Capture15.JPG

but says it isn't available... (is this correct and would be the feature that i need for it to do what I am describing? is there any other way?) Thanks
Capture16.JPG
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
I haven't used JKP's Name Manager and perhaps he will see your post and respond, in the meantime assuming the references you want to convert all start with ='C this might work for you.

VBA Code:
Sub RemoveExternalRef()

    Dim nm As Name
    Dim sTemp As String
   
    For Each nm In ActiveWorkbook.Names
        If Left(nm.RefersTo, 3) = "='C" Then
            sTemp = Replace(nm.RefersTo, Mid(nm.RefersTo, 3, InStr(nm.RefersTo, "]") - 2), "")
            nm.RefersTo = sTemp
        End If
    Next nm

End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,131
Messages
6,123,222
Members
449,091
Latest member
jeremy_bp001

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top