Get rid of apostrophes

jaypatel

Active Member
Joined
Nov 25, 2002
Messages
389
Hi,

I have a column of data which is column B. What would be the code to get rid of all the apostrophes at the beginning of each cell from cell b1-b65536.

Cheers

Jay
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Why not just do a Find & Replace [Ctrl+H], with a Find What equal to ', and a blank value in the replace field?
 
Upvote 0
TommyGun's answer is good enough but if a macro it must be then try

Code:
'The following procedure removes the apostrophe in front of text, values, or formulas in the current selection:
'Removes hidden apostrophes that are first characters.
'Works on cells with formulas, text, or values.
Sub ApostropheRemove()
    For Each currentcell In Selection
        If currentcell.HasFormula = False Then
            'Verifies that procedure does not change the
            'cell with the active formula so that it contains
            'only the value.
            currentcell.formula = currentcell.Value
        End If
    Next
End Sub

HTH
 
Upvote 0

Forum statistics

Threads
1,214,786
Messages
6,121,546
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