View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Strip 2 Numbers from a Hyphenated Range

John,

Try:
=TRIM(LEFT(A1,FIND("-",A1)-1))
and
=TRIM(MID(A1,FIND("-",A1)+1,99))


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)




"Johnny" wrote in message
...
I pulled the following 52-week stock quote range from Yahoo
financials: (8.50 - 11.87). This is in cell A1.
My goal would be to have the 8.50 in cell A2 and the 11.87 in cell A3.

I tried using the left and right formulas, and they work, but I am
trying to avoid a bunch of nested IFs to take into account the many
different sizes of numbers I might have to work with. It could range
from 3-5 digits on either side.

What I am looking for is the formula that would pull the left
characters out up until it hits the hyphen, and actually do a minus
one to get rid of the space between the digit and the hyphen. Ditto on
the right hand side of the range. I appreciate all suggestions.

Thanks
John