Saturday, January 8, 2011

Extracting numerator and denominator from a fraction

trick_1:


if you want ansere like 475/5, then the numerator becames 95, and denominator  becames 1.
for getting answer 95, you can use this formula

=RIGHT(TEXT(A1,"? ?/?"),LEN(TEXT(A1,"? ?/?"))-FIND("/",TEXT(A1,"? ?/?")))

or

=RIGHT(TEXT(A1,"? ?/????????"),LEN(TEXT(A1,"? ?/????????"))-FIND("/",TEXT(A1,"? ?/????????")))


trick_2:
numerator
=LEFT(TEXT(A1,"???/???"),FIND("/",TEXT(A1,"???/???"))-1)+0

denominator
=RIGHT(TEXT(A1,"???/???"),FIND("/",TEXT(A1,"???/???"))-1)+0

No comments:

Post a Comment