Remove the character (") from string

ronbowalker

New Member
Joined
Dec 23, 2009
Messages
10
Hello all,
I have imported a lot of data from an inventory system and find that some of the descriptions of these inventory items contain the (") characher in them. They were using this character as the inches measurement in the description, and is creating issues in my VB coding. I need to remove these little devils in each occurance......and so here it is to resolve. Where the characted occurs in the string varies, so the plot thickens...

I cannot find this character removal process an any of the posts to this point. And I find it difficult to code this character out creating a variation of any know way.

Here is a sample to be fixed: (16" Tape Measure)&(Vertical Rack 62").

Can anyone shed some light on this?

Thanks in advance....
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Highlight all cells that have this occurance and do a find/replace where you look for the character " and replace with nothing
 
Upvote 0
This would work, but I would like to automate this process in VB. There are way too many items in the inventory (which are changing) to scan manually all the time and find them.

Is it possible to do VB?

Thanks
 
Upvote 0
No need to scan manually. If you want every single " removed from the spreadsheet, do the find/replace, search for " and replace with nothing, then hit "replace all"

If you have a specific column or row that these will always occur in, just highlight that column or row and do the same thing, find/replace.
 
Upvote 0
Hi

In VBA:
NewValue = Worksheetfunction.Substitute(OldValue, """" ," inch")

However, like Kowz I would tend towards pre-cleaning the data using either the menu function or a formula to create a new value in a new column, that is used by the VBA routine:
=SUBSTITUTE(A1,""""," inch")

If you don't want the word inch, then simply use "" to replace the " with nothing.

Andrew
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,542
Members
449,316
Latest member
sravya

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