View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default ignore text in formula

If, on the other hand, numbers are possibly mixed within the text, this will
return the *first* set of numbers:

=H17*LOOKUP(99^99,--MID(J17,MIN(FIND({0,1,2,3,4,5,6,7,8,9},J17&"012345 6789")),ROW(INDIRECT("1:256"))))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"RagDyeR" wrote in message
...
Of course, the unary is superfluous in my examples.
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"RagDyeR" wrote in message
...
You didn't elaborate on *all* the possibilities that may exist in J17.

This works for your example:

=--LEFT(J17)*H17

If maybe more then a single digit:

=--LEFT(J17,FIND(" ",J17)-1)*H17

Both suggestions assume a <space between the leading number and the text.

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===



"jatman" wrote in message
...
i am using the following formula

=J17*H17

the problem is J17 is imported from another file, and that always contains a
number value along with some text value (ex. 5 CS). when the formula is
calcuated, it returns #VALUE!

can the formula be written so that it looks at the number value only and
ignores the text?

thank you,

jat