ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   remove decimal point for csv sheet (https://www.excelbanter.com/excel-discussion-misc-queries/144250-remove-decimal-point-csv-sheet.html)

Jerry Lee

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

MartinW

remove decimal point for csv sheet
 
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 copypaste specialvalues
before your find and replace.

HTH
Martin



Teethless mama

remove decimal point for csv sheet
 
Give us some examples


"Jerry Lee" wrote:

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


Gary''s Student

remove decimal point for csv sheet
 
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



--
Gary''s Student - gsnu200725


"Jerry Lee" wrote:

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



All times are GMT +1. The time now is 02:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com