Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
PH
 
Posts: n/a
Default separating numbers and letters from alphanumeric cell contents

I know the subject line is a bit vague, let me explain.

Using Excel 2000, I have a cell "A1" with the value "18E" in it. In
cell "A2" I need to report *only* the number value in cell "A1", and in
cell "A3" I need *only* the letter found in cell "A1."

The problem: the contents of "A1" could be any value from 0 to 100 and
there *may or may not* be any letter at all in the cell. I need the
number reported regardless of what it is, and I need the letter to be
reported, but if it's not present I need it to report something like
"none."

Caveat: I can't use any macros at all in this worksheet, so no macro
answers can be used.

Any non-macro assistance you can give me is greatly appreciated.

Thanks!
PH

  #2   Report Post  
Harlan Grove
 
Posts: n/a
Default

PH wrote...
....
Using Excel 2000, I have a cell "A1" with the value "18E" in it. In
cell "A2" I need to report *only* the number value in cell "A1", and in
cell "A3" I need *only* the letter found in cell "A1."

The problem: the contents of "A1" could be any value from 0 to 100 and
there *may or may not* be any letter at all in the cell. I need the
number reported regardless of what it is, and I need the letter to be
reported, but if it's not present I need it to report something like
"none."

....

Simple enough to do with formulas alone. If your column A values would
never exceed 4 characters in length (up to 3 decimal numerals and one
letter), use the following to parse the numerals.

A2:
=LOOKUP(1000,-MID(A1,1,{1;2;3}),MID(A1,1,{1;2;3}))

A3:
=IF(LEN(A1)<LEN(A2),RIGHT(A1,1),"none")

  #3   Report Post  
David Billigmeier
 
Posts: n/a
Default

Why can't you use macros?

First, let me ask you... if there is a letter in the value, will it always
be last in the string? Also, will there always be just one letter or can
there be multiple?
--
Regards,
Dave


"PH" wrote:

I know the subject line is a bit vague, let me explain.

Using Excel 2000, I have a cell "A1" with the value "18E" in it. In
cell "A2" I need to report *only* the number value in cell "A1", and in
cell "A3" I need *only* the letter found in cell "A1."

The problem: the contents of "A1" could be any value from 0 to 100 and
there *may or may not* be any letter at all in the cell. I need the
number reported regardless of what it is, and I need the letter to be
reported, but if it's not present I need it to report something like
"none."

Caveat: I can't use any macros at all in this worksheet, so no macro
answers can be used.

Any non-macro assistance you can give me is greatly appreciated.

Thanks!
PH


  #4   Report Post  
PH
 
Posts: n/a
Default

Dave,

The letter will *always* be last in the series. There will be only one
letter.

PH

  #5   Report Post  
ilanr01
 
Posts: n/a
Default


PH Wrote:
I know the subject line is a bit vague, let me explain.

Using Excel 2000, I have a cell "A1" with the value "18E" in it. In
cell "A2" I need to report *only* the number value in cell "A1", and
in
cell "A3" I need *only* the letter found in cell "A1."

The problem: the contents of "A1" could be any value from 0 to 100 and
there *may or may not* be any letter at all in the cell. I need the
number reported regardless of what it is, and I need the letter to be
reported, but if it's not present I need it to report something like
"none."

Caveat: I can't use any macros at all in this worksheet, so no macro
answers can be used.

Any non-macro assistance you can give me is greatly appreciated.

Thanks!
PH

Try
In A2 =IF(ISNUMBER(A$1),A$1,LEFT(A$1,LEN(A$1)-1))
In A3 =IF(ISNUMBER(A$1),"none",RIGHT(A$1,1))
Ilan


--
ilanr01
------------------------------------------------------------------------
ilanr01's Profile: http://www.excelforum.com/member.php...o&userid=26797
View this thread: http://www.excelforum.com/showthread...hreadid=400521



  #6   Report Post  
PH
 
Posts: n/a
Default

Harlan,

Your A2 forumula works great, but the A3 formula only ever reponds
"none," and not the letter.

PH

  #7   Report Post  
Harlan Grove
 
Posts: n/a
Default

PH wrote...
Your A2 forumula works great, but the A3 formula only ever reponds
"none," and not the letter.


That's because I screwed up my A3 formula. It should be

=IF(LEN(A1)LEN(A2),RIGHT(A1,1),"none")

  #8   Report Post  
PH
 
Posts: n/a
Default

That's it! you guys are freaking awesome.

Thanks!

PH

  #9   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On 30 Aug 2005 09:57:57 -0700, "PH" wrote:

I know the subject line is a bit vague, let me explain.

Using Excel 2000, I have a cell "A1" with the value "18E" in it. In
cell "A2" I need to report *only* the number value in cell "A1", and in
cell "A3" I need *only* the letter found in cell "A1."

The problem: the contents of "A1" could be any value from 0 to 100 and
there *may or may not* be any letter at all in the cell. I need the
number reported regardless of what it is, and I need the letter to be
reported, but if it's not present I need it to report something like
"none."

Caveat: I can't use any macros at all in this worksheet, so no macro
answers can be used.

Any non-macro assistance you can give me is greatly appreciated.

Thanks!
PH


Assuming there can only be a maximum of one letter, and it will be at the end,
then this might work:

For the number:

=IF(ISERROR(-RIGHT(A1,1)),LEFT(A1,LEN(A1)-1),A1)

For the letter:

=IF(ISERROR(-RIGHT(A1,1)),RIGHT(A1,1),"none")

Note that the "number" formula returns the number as TEXT. If you need it
returned as a NUMBER, then:

=IF(ISERROR(-RIGHT(A1,1)),--LEFT(A1,LEN(A1)-1),A1)


--ron
  #10   Report Post  
Krishnakumar
 
Posts: n/a
Default


Assuming there can only be a maximum of one letter, and it will be at
the end,

Another option..

For Letter,

In B1

=REPLACE(A1,1,LEN(A1)-1,"")

For Number,

=--SUBSTITUTE(A1,B1,"")

HTH


--
Krishnakumar


------------------------------------------------------------------------
Krishnakumar's Profile: http://www.excelforum.com/member.php...o&userid=20138
View this thread: http://www.excelforum.com/showthread...hreadid=400521



  #11   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Sat, 3 Sep 2005 03:02:03 -0500, Krishnakumar
wrote:


Assuming there can only be a maximum of one letter, and it will be at
the end,

Another option..

For Letter,

In B1

=REPLACE(A1,1,LEN(A1)-1,"")

For Number,

=--SUBSTITUTE(A1,B1,"")

HTH


Doesn't work if there is no letter.


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
no row numbers or column letters DISPLAYED RagDyer Excel Discussion (Misc queries) 4 April 24th 23 03:42 AM
How do I sort letters before numbers in Excel? RiverGirl Excel Discussion (Misc queries) 4 May 27th 05 04:09 PM
Columns in letters vs numbers garyflood Excel Discussion (Misc queries) 1 April 22nd 05 03:21 PM
VLOOKUP for a cell with both letters and numbers Sonohal Excel Discussion (Misc queries) 6 April 8th 05 02:13 PM
Excel column headings from numbers to letters happygolucky Excel Discussion (Misc queries) 2 January 21st 05 06:15 PM


All times are GMT +1. The time now is 11:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"