Sorry - Excel help ...
 

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

[Closed] Sorry - Excel help please

3 Posts
2 Users
0 Reactions
39 Views
Posts: 2862
Full Member
Topic starter
 

I know you Excel gurus love this stuff, and this is dead easy.

I have a spreadsheet with a column of cells that all contain something like this:

ES.RO(DK4 P) 254017

The text in each cell ends with a 6 digit number, which I want to extract as a value.  That I can do using something like:

=VALUE(RIGHT(A1,6))

However, the clever clogs who originally created the list has added random numbers of spaces after the 6 digits. So I don't always get all 6 digits.

How can I get Excel to ignore the spaces?  There's quite a lot of the cells, and it'll be a long job to go through and manually delete the spaces in the cells.


 
Posted : 15/10/2018 7:27 am
Posts: 10315
Full Member
 

Can you use TRIM on the whole cell first and then right

edit: =VALUE(RIGHT(TRIM(A1),6))


 
Posted : 15/10/2018 7:29 am
Posts: 2862
Full Member
Topic starter
 

Brilliant!

That is so clever and tidy and simple.  I looked online an there were all these super complicated things to do with Macros and VBA and other stuff I knew not what.

Thanks Leffeboy


 
Posted : 15/10/2018 7:50 am
Posts: 10315
Full Member
 

Simple solutions rock.  Happy to help


 
Posted : 15/10/2018 1:14 pm

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