Removing " as a Special Character

GreatOffender

Board Regular
Joined
Feb 2, 2015
Messages
53
I have a sheet with formulas in it and I need to remove them which isn't a problem except one of the cells is creating a problem. I cannot adjust the source data or I would fix it there first. Each cell in the first 3 columns is in a formula format similar to ="xxxx-xx-xxxx" and the formulas are not visible unless you select the cell. But, there is one cell with an error in which the "=" is visible (not part of a formula). The unselected/highlighted cell clearly shows the "=". When I try and remove the formulas using a ranged.value it errors because of that one visible "=". If I try and remove that special character I am left with a sheet surrounded by quotation marks and I haven't figured out how to remove quotation marks without the code believing I am trying to surround it with quotes. Making sense?
I seem to be boxed in??? No, I cannot attach a sample because I need to alter it for opsec reasons. Once I alter it I cannot reproduce it.
 
Last edited:

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I take it that you have tried a Find/Replace with = in the Find box (or possibly ~=) and leaving the Replace box blank?
 
Upvote 0
I've tried using
Code:
Cells.Replace What:="=", Replacement:="", LookAt:=xlPart

but it removes all of the "=" and now I am left with 3 columns surrounded by quotation marks. I would remove the quotation marks using VBA but I am not skilled enough because just placing a " in a line causes the system to start looking for the closing ". How does one remove all of the quotation marks by using VBA?
 
Upvote 0
Either one should remove double quotations
Code:
Sub Maybe_A()
    ActiveSheet.UsedRange.Replace What:="""", Replacement:="", LookAt:=xlPart
End Sub

Code:
Sub Maybe_B()
    ActiveSheet.UsedRange.Replace What:=Chr(34), Replacement:="", LookAt:=xlPart
End Sub
 
Upvote 0
jolivanes - Thanks! I see the err of my ways. When I tried to remove the quotes with that bit of code I wasn't putting the double "" in between the outer quotes. I was just using one and this caused an obvious error. Perfect storm of speed, aggravation, and just plain stupidity.
 
Upvote 0
As long as you get it to work
Good Luck
 
Upvote 0

Forum statistics

Threads
1,214,787
Messages
6,121,558
Members
449,038
Latest member
Guest1337

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