Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
KRK KRK is offline
external usenet poster
 
Posts: 91
Default function help please

Hello,

Can someone help me with a function to do this please ?

I have a cell with a text string in it, the cell is a mixture of numbers &
characters, eg 12ABC, or D45678. The numbers and characters are never mixed
up together (ie I never have AB12CD34).

I want to pick out the number part so I can do some calculations with it,

Can someone help me with a function to do it for me please?

Thanks

K

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 265
Default function help please

Assuming that A2 contains the text string, try...

=MID(A2,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A2&"0123456 789")),SUM(LEN(A2)-LEN(
SUBSTITUTE(A2,{0,1,2,3,4,5,6,7,8,9},""))))


In article ,
"KRK" wrote:

Hello,

Can someone help me with a function to do this please ?

I have a cell with a text string in it, the cell is a mixture of numbers &
characters, eg 12ABC, or D45678. The numbers and characters are never mixed
up together (ie I never have AB12CD34).

I want to pick out the number part so I can do some calculations with it,

Can someone help me with a function to do it for me please?

Thanks

K


--
Domenic
http://www.xl-central.com
  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default function help please


KRK;297472 Wrote:
Hello,

Can someone help me with a function to do this please ?

I have a cell with a text string in it, the cell is a mixture of
numbers &
characters, eg 12ABC, or D45678. The numbers and characters are never
mixed
up together (ie I never have AB12CD34).

I want to pick out the number part so I can do some calculations with
it,

Can someone help me with a function to do it for me please?

Thanks

K


Hi,
try the following

=MID(A1,MATCH(FALSE,ISERROR(1*MID(A1,ROW(INDIRECT( "1:100")),1)),0),
100-SUM(1*ISERROR(1*MID(A1,ROW(INDIRECT("1:100")),1))) )*1

enter the formula as an arry formula with Ctrl+Shift+Enter


--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload -faster and better answers

*Adding your XL version* to your post helps finding solution faster
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=83142

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 60
Default function help please

Since you want to subsequently perform a calculation,
I'm guessing the number to extract will be within Excel's
15 significant digit limitations...

If that's true, this formula returns the numeric
part of a string that either begins or ends with numbers:
=LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},
A1&"0123456789")),ROW($1:$15))))

Examples:
ABC0123....formula returns: 123
0123abc....formula returns: 123
ABC9876....formula returns: 9876

Is that something you can work with?

Regards,

Ron Coderre
Microsoft MVP (Excel)

"KRK" wrote in message
...
Hello,

Can someone help me with a function to do this please ?

I have a cell with a text string in it, the cell is a mixture of numbers &
characters, eg 12ABC, or D45678. The numbers and characters are never
mixed up together (ie I never have AB12CD34).

I want to pick out the number part so I can do some calculations with it,

Can someone help me with a function to do it for me please?

Thanks

K


  #5   Report Post  
Posted to microsoft.public.excel.newusers
KRK KRK is offline
external usenet poster
 
Posts: 91
Default function help please Thanks

As always thanks for the help

KK


"KRK" wrote in message
...
Hello,

Can someone help me with a function to do this please ?

I have a cell with a text string in it, the cell is a mixture of numbers &
characters, eg 12ABC, or D45678. The numbers and characters are never
mixed up together (ie I never have AB12CD34).

I want to pick out the number part so I can do some calculations with it,

Can someone help me with a function to do it for me please?

Thanks

K




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
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


All times are GMT +1. The time now is 01:49 PM.

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

About Us

"It's about Microsoft Excel"