only extract numeric value from alpha numeric cell

  • Thread starter Fam via OfficeKB.com
  • Start date
F

Fam via OfficeKB.com

Good Morning ...
if I have a cell with alpha numeric value, is there any way to extract only
numeric value out of the cell?
for example:
9 years
22 years
20.5 years
22.17years
22.17 years
can it be just after some formula:
9
22
20.5
22.17
22.17
Any help will be appreciated.
thx
 
D

Dave Peterson

If your data always ends with "years" or " years", you could just select that
column, then

Edit|replace
what: year
with: (leave blank)
replace all
 
G

Gary''s Student

For cells like 1.234 years you want to discard the last 6 characters, use:
=LEFT(A1,LEN(A1)-6)
For cells like 1.234years you want to discard the last 5 characters, use:
=LEFT(A1,LEN(A1)-5)
 
D

Dave Peterson

Make sure you include the "S"

Edit|replace
what: years <--- changed
with: (leave blank)
replace all
 
F

Fam via OfficeKB.com

Thanks, it works great
Fam

Gary''s Student said:
For cells like 1.234 years you want to discard the last 6 characters, use:
=LEFT(A1,LEN(A1)-6)
For cells like 1.234years you want to discard the last 5 characters, use:
=LEFT(A1,LEN(A1)-5)
Good Morning ...
if I have a cell with alpha numeric value, is there any way to extract only
[quoted text clipped - 13 lines]
Any help will be appreciated.
thx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top