Convert #NAME? values to Strings

gelen4o

New Member
Joined
Jul 31, 2017
Messages
28
Hi,

I have row data that contains serial numbers in the following format "-VPT0000017J". Due to the minus upfront excel thinks this is a formula and assigns an additional "=" to the front. All and all I get an end result of "=-VPT0000017J", which is then displayed as #NAME? making it impossible to format.

Changing the way source data is formatted is not an option so I need a way to get rid of the additional characters.
I already tried using RIGHT; RIGHT+LEN(-2),SUBSITUTE or CTRL + F (Replace). Neither of them worked for me.

I would like a solution that I can turn into a simple VBA, which is to go through the entire column and automatically replace "=-" if needs be.

Any help will be much appreciated!
 
Last edited:

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
What happens if you remove the "-"? Select the column and use Replace function, does the data then look ok?
 
Last edited:
Upvote 0
Hello! Easy solution for you:

1. Highlight the column that these errors are in
2. Press control + F (Find and Replace)
3. Click the Replace Tab
4. In the "Find What:" box type: =
5. In the "Replace with:" box type: '
6. Hit Replace All

Let me know if this works or if you need any more help!
 
Upvote 0
Thank you all for the suggestions !!!
Eventually it took a bit of everything to resolve the issue

What worked for me is as follows:

1. First convert the entire column as text (either source file or destination sheet)
2. Then use CRTL + H to replace "=-" with whatever value or simply leave blank.
It's crucial for the "-" to be removed as this is what has caused the problem in the first place

After that values will appear as text !
VBA and Pivot Tables have no problem working with them
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,377
Messages
6,124,598
Members
449,174
Latest member
chandan4057

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