Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How to add alphanumeric data? (e.g., 1C+2D)

I have a set of alphanumeric data. How do I add just numbers, leaving
letters behind?

For instance, 1X+2X+3X should = 6. Any suggestions?

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 623
Default How to add alphanumeric data? (e.g., 1C+2D)

If you always have one digit to add, you can use:

=left(a1,1)+left(a2,1)+left(a3,1)

If you can have more than one digit, but only one letter, you can use:

=left(a1,len(a1)-1)+...

If you have something else, let us know.

--
Regards,
Fred


wrote in message
ups.com...
I have a set of alphanumeric data. How do I add just numbers, leaving
letters behind?

For instance, 1X+2X+3X should = 6. Any suggestions?

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default How to add alphanumeric data? (e.g., 1C+2D)

Try this UDF:

Function noname(r As Range) As Variant
v = r.Value
For i = 65 To 90
v = Replace(v, Chr(i), "")
Next
For i = 97 To 122
v = Replace(v, Chr(i), "")
Next
noname = Evaluate("=" & v)
End Function


use in worksheet like:
=noname(A1)
--
Gary''s Student - gsnu200719
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default How to add alphanumeric data? (e.g., 1C+2D)

On 9 May 2007 05:52:33 -0700, wrote:

I have a set of alphanumeric data. How do I add just numbers, leaving
letters behind?

For instance, 1X+2X+3X should = 6. Any suggestions?

Thanks!


If you're strings might be more complicated than what you've posted, you could
download and install Longre's free morefunc.xll add-in from
http://xcell05.free.fr/

Then use this formula:

=EVAL(REGEX.SUBSTITUTE(A1,"[A-Za-z]"))


--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
How to sort AlphaNumeric Data sequentially with spaces Dave09 Excel Discussion (Misc queries) 4 February 1st 07 11:25 PM
Finding unique entries among two columns of alphanumeric data Bob Excel Worksheet Functions 10 October 23rd 06 02:40 PM
sort alphanumeric data yip New Users to Excel 2 November 18th 05 10:31 PM
can you create a chart in excel with alphanumeric data? Pugwyrm Charts and Charting in Excel 3 June 6th 05 07:10 PM
How to Perform Lookup on Alphanumeric Data? Damian Carrillo Excel Discussion (Misc queries) 5 May 19th 05 07:18 PM


All times are GMT +1. The time now is 05:58 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"