PriorityOne
New Member
- Joined
- Nov 6, 2014
- Messages
- 8
I need to remove the forward slashes and leave the results in a data set like the below. I keep losing the leading zeros when I do a replace all with / in the find and left the replace with blank even when the cells are formatted to Text. I am working in Excel 2010 with a regular .xlsx file - I know the csv tricks and what is necessary when I have pure numeric characters. the only thing that has worked is to put an apostrophe in front of the first characters in the first cell ('0019A in the example below) and then use the format painter to copy the format down to the other characters prior to doing the replace. I thought it might because the removal of the forward slash would make the characters numeric, lost it's text properties and removed the leading zeros, but the results are still in a cells formatted as Text. I found a formula that worked =IF(RIGHT(A1,1)="/",LEFT(A1,4),A1) which would maintain the leading zero if I did a copy paste special values into a general formatted cell. Can anyone explain why I can't use the replace function and why the formula would work with leading zeros in a general formatted cell?
0019A
0043/
0051/
0104/
0119/
0133/
0140/
0146/
0153/
0162A
0019A
0043/
0051/
0104/
0119/
0133/
0140/
0146/
0153/
0162A
Last edited: