Forum menu
Sorry - Excel help ...
 

[Closed] Sorry - Excel help please

Posts: 2885
Full Member
Topic starter
 
[#10277061]

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 8:27 am
Posts: 10337
Full Member
 

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

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


 
Posted : 15/10/2018 8:29 am
Posts: 2885
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 8:50 am
Posts: 10337
Full Member
 

Simple solutions rock.ย  Happy to help


 
Posted : 15/10/2018 2:14 pm