Replace "0." in text field

vavs

Well-known Member
Joined
Jul 2, 2004
Messages
516
I have a table that was created from another table. The data in the column in the new table is TEXT. My problem is that some of the values are being treated as numbers, because they look like numbers. What I need to do is to save the cell as a text field without a leading zero.

The field looks like this right now 0.017, I need to make it .017

I have tried to convert the column to text and then replace 0. with . but it does not change the value at all.

This is critical as I am doing a match to this field and 0.017 and .017 do not match.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Since you have a mix of values, try this...

=IF(LEFT(A1,2)="0.",MID(A1,2,99),A1)
 
Upvote 0
Those work and here is what I ended up using:

=IF(ISERROR(FIND("0.",$C79)),$C79,IF(FIND("0.",$C79)=1,REPLACE($C79,1,1,""),$C79))

I have some cells that contain data that does not need to be changed. In those cases, I just want to keep the value as is.


Thanks for all the suggestions and help.
 
Upvote 0
I have some cells that contain data that does not need to be changed. In those cases, I just want to keep the value as is.
To the best of my knowledge, both formulas that I posted (exactly as I posted them) already do that... give them a try against your actual data and see for yourself.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,710
Members
452,939
Latest member
WCrawford

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