View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
Ken Ken is offline
external usenet poster
 
Posts: 10
Default I need to search for then extract a specific portion of cell data.

Richard -

Thanks for your help. The formula you provided doesn't seem to work for me.
Although it captures the number, it is also capturing the "x/X". Also, where
there is no number to capture, it's providing a "#VALUE!" instead of a "1".

Thanks again,
//Ken


"Richard Buttrey" wrote in
message ...

Hi,

This seems to work for your set of 6 records. Obviously it will nned
modifying if there are any formats that don't meet the rule I
explained in the last post.

Watch the word wrap, this is all one formula.


=IF(ISERROR(FIND("(",A1)),RIGHT(A1,LEN(A1)-FIND("x",A1)-1),SUBSTITUTE(MID(A1
,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1),"x",""))

Rgds



On Fri, 01 Sep 2006 20:06:14 GMT, "Ken" wrote:

Richard,

I think your on to something here. Toppers response worked great except,

as
you pointed out, it only captures the numbers in (##) or ( ## ). It does

not
capture numbers in (x##) or ( x## ) or (X##), etc... Ultimately, I need

to
capture all scenarios. If the part number does not have a quantity at the
end (usually indicated by the "x/X" or "(" ), then the result should be

the
number "1", indicating a single part number.

EXAMPLE:
Cell "A"
700001103 (x4)
(part number) 700001103 (quantity of) (x4) < (i need just the
number indicating the quantity, regardless of what it is/is not wrapped

in)
4

Is this possible to do?

Thanks again, to you and Toppers
//Ken

"Richard Buttrey" wrote in
message ...
What do you mean by foolproof?

It is foolproof for the limited set of 6 records you give as an
example.

Have you any other formats that are not covered by
the rules covered.

i.e
include characters between "(" and ")" unless the character is "x" or
" " (space)
or if null result include all characters following the last space

Regards

On Fri, 1 Sep 2006 11:27:02 -0700, Toppers
wrote:

Ken,
I tested this in your sample and it appears to work BUT I

cannot
guarantee it is "foolproof"!

=VALUE(TRIM(MID(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE( A1,"("," "),"x","
"),")",""),FIND(" ",SUBSTITUTE(SUBSTITUTE(A1,"("," "),"x"," ")),255)))

HTH

"Ken" wrote:

I need to search for then extract a specific portion of cell data.

Below, I
have provided an example of what I'm trying to do.

Column "A" (raw data) Column "B" (end result)
700001103 (x4) 4
8675-US (59) 59
8675-EU x 5 5
6330-02(18) 18
6330-02CE (x10 ) 10
6305-02 (1) 1
58516 (x117) 117

I hope someone can help me.

Thanks.
//Ken




__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________



__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________