How do I remove text from a number?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I remove the "M" from the number 12,000M? The functions left & right
don't work becuase the number of digits before the M can change however M
will always be last.
 
You can try doing a search and replace on the word M

Search and replace M with nothing - that should get rid of the M in th
cells

Good luck

Andy B
 
Here is one way, it will turn it back into a real number:

=VALUE(REPLACE(D9,LEN(D9),1,""))

where D9 is the text to change

Good Luck

Mike
 
did you try the MID function? if M is always the last character:

=MID(A1,1,(LEN(A1)-1))

alternately, this formula will give you all the character upto M, an
if there are characters beyond M, they will be left out:

=MID(A1,1,(SEARCH("M",A1,1)-1)
 
How can I remove the "M" from the number 12,000M? The functions left & right
don't work becuase the number of digits before the M can change however M
will always be last.

Is the last character always an "M"?

If so, then

=SUBSTITUTE(A1,"M","")

If the last character can be anything:

=LEFT(A1,LEN(A1)-1)


--ron
 

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

Back
Top