remove decimal point for csv sheet

J

Jerry Lee

Need to remove decimal point to allow import into actinic shopping software,
have tried find & replace does not always work?
 
M

MartinW

Hi Jerry,

Find and replace . with nothing should work whether
your data is text or numbers.
If your data is a return from a formula then you will need
to either adjust your formula or do copy>paste special>values
before your find and replace.

HTH
Martin
 
G

Gary''s Student

Enter this macro:

Sub point_killer()
For Each r In Selection
r.Value = Replace(r.Text, ".", "")
Next
End Sub

select the cells and run the macro. For example, if we start with:
1
1.1
1.12
1.123
1.1234
a.b
a..b
1.2.3.4.5.6.7.8.9
..................
and run the macro, we get:
1
11
112
1123
11234
ab
ab
123456789
 
Top