View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Extract numerator from fraction

Try something like this:

A1: (a number....displayed as a fraction or not)

This formula returns the 32nd's numerator, if any :
=LEFT(TEXT(MOD(A1,1),"#/32"),FIND("/",TEXT(MOD(A1,1),"#/32"))-1)

Example:
A1: =5/32
B1 returns 5

and...this formula returns whatever numerator Excel uses with a general
fraction display:
=LEFT(TEXT(MOD(A1,1),"#/##"),FIND("/",TEXT(MOD(A1,1),"#/##"))-1)

Example:
A1: =1 3/13.....converts to: =1.23076923076923
B1 returns 3

Note though, without knowing the denominator...does only knowing the
numerator help?

Is that something you can work with?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"tf" wrote in message
...
I have a column of decimal values in an Excel 2003. I have converted the
values to fractions using the "format cell" function and would like to
extract the numerator values from the fractions. I thought I could do
this
by converting text to columns with the "/" as a delimiter, such that the
numerator and denominator values would be returned in separate columns.
The
problem is that even though my values show as a fraction, they are still
read
as decimals by Excel and the text to columns won't work. I've tried using
the "paste special" function to replace the decimals with the fraction
values, but that did not work either.

Any ideas on how to get Excel to read the values as fractions so that I
can
use the text to columns function; or another method that will allow me to
extract the numerator values? (I don't have a common denominator, so I
can't
use the dollar functions)

Thanks!