.xls guru help plea...
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] .xls guru help please. Reformatting data

6 Posts
7 Users
0 Reactions
46 Views
 benz
Posts: 1143
Free Member
Topic starter
 

Need to do some lookups.

Unfortunately some numpties have decided to represent the same data differently.

AB0123
AB123

Any quick and easy way I can delete the zero or indeed introduce the zero?

Thanks


 
Posted : 21/10/2015 3:13 pm
Posts: 10761
Full Member
 

If it's always the first 2 characters then 3 or 4 numbers you can use something like

LEFT(A1,2)&TEXT(MID(A1,3,99),"0000")

just use 3 0's at the end of the TEXT functon if you want to get rid of the first 0.


 
Posted : 21/10/2015 3:19 pm
 Crag
Posts: 890
Free Member
 

if you just want to get rid of the 0 then the easiest way would be to use the find and replace.

Highlight the cells, then Find 0, replace with <blank>


 
Posted : 21/10/2015 3:24 pm
Posts: 3723
Free Member
 

if you just want to get rid of the 0 then the easiest way would be to use the find and replace.

Highlight the cells, then Find 0, replace with <blank>

Although quick and easy you'll also catch any other 10s 20s etc with that.

If you're going to do a hacky find and replace then do something a little more creative like find AB0 and replace with AB.

this of course assumes there's not any ACs BAs etc


 
Posted : 21/10/2015 3:28 pm
Posts: 0
Free Member
 

As above it depends if all data matches the format in your examples
If so i'd use 'LEFT' 'RIGHT' and 'CONCATENATE' to pull out the bits I wanted into a new column.


 
Posted : 21/10/2015 3:40 pm
Posts: 6
Free Member
 

Depending on the mess its in you could use Text to Columns to separate out the numbers. Then manipulate as required and Concatenate to merge the results.


 
Posted : 21/10/2015 3:41 pm
Posts: 719
Full Member
 

if it'll always be 3 numbers i.e. 123 and not 1123, then use this in the adjacent column and copy down the whole list

=IF(LEN(A2=5),LEFT(A2,2)&"0"&RIGHT(A2,3),A2)

this will either copy the adjacent cell if its AB0123 or add in the 0 if its AB123 to give a 6 character result


 
Posted : 21/10/2015 3:49 pm

6 DAYS LEFT
We are currently at 95% of our target!