Show denominator and numerator of fraction

Cosmos75

Active Member
Joined
Feb 28, 2002
Messages
359
If I have a cell to be formatted as a fraction, is there anyway to get the denominator and numerator of the fraction.

E.g.

If Excel has .26163 as 45/172 in Cell A1, is there anyway to get a cell B1 to show 45 and Cell C1 to show 172?

FYI, 3.26163 lightyears is 1 Parsec.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
There may be a better way, but
num
=LEFT(TEXT(A1,"???/???"),FIND("/",TEXT(A1,"???/???"))-1)+0

denom
=RIGHT(TEXT(A1,"???/???"),FIND("/",TEXT(A1,"???/???"))-1)+0
 
Upvote 0
On 2002-04-16 10:11, Cosmos75 wrote:
If I have a cell to be formatted as a fraction, is there anyway to get the denominator and numerator of the fraction.

E.g.

If Excel has .26163 as 45/172 in Cell A1, is there anyway to get a cell B1 to show 45 and Cell C1 to show 172?

FYI, 3.26163 lightyears is 1 Parsec.
I know there are probably more elegant solutions, for this one use

in cell B1 =LEFT(A1,FIND("/",A1,1)-1)
in cell C1 =RIGHT(A1,FIND("/",A1,1))

HTH
 
Upvote 0
IML,

Thanks! Works Great!

Yogi,

Your formula gave me a #VALUE error message. But Thank You for trying!!
This message was edited by Cosmos75 on 2002-04-16 11:01
 
Upvote 0
Hi cosmos75:
I did check my formula by entering
45/172 in cell A1, then

=LEFT(A1,FIND("/",A1,1)-1)+0 in cell B1 gives 45, and

=RIGHT(A1,FIND("/",A1,1))+0 in cell C1 gives 172

Please enter just the fraction 45/172 and not =45/172 in cell A1

I would like to see what error you got ... it does work for me!
 
Upvote 0
On 2002-04-16 11:13, Yogi Anand wrote:
Hi cosmos75:
I did check my formula by entering
45/172 in cell A1, then

=LEFT(A1,FIND("/",A1,1)-1)+0 in cell B1 gives 45, and

=RIGHT(A1,FIND("/",A1,1))+0 in cell C1 gives 172

Please enter just the fraction 45/172 and not =45/172 in cell A1

I would like to see what error you got ... it does work for me!

Yogi,

.26163 is entered in a cell formatted as a fraction. Therefore it errors out when it can't find a "/" in .26163
 
Upvote 0
Hi cosmos75 and IML:
IML's formula is more comprehensive and works when 45/172 is entered as a text string or as a number (as in =45/172). The one that I proposed works only when 45/172 is entered as a text string.

Regards!
 
Upvote 0
Yogi,

.26163 is entered in a cell formatted as a fraction. Therefore it errors out when it can't find a "/" in .26163

Hi IML:
Yes Sir ... Agreed ... as I stated before you formula is more comprehensive and is the one I would use. T H A N K S !
 
Upvote 0
On 2002-04-16 10:11, Cosmos75 wrote:
FYI, 3.26163 lightyears is 1 Parsec.

Hey Cosmos,

You sound as if you're in Astrophysics.... have you read Cliff Stohl's book <u>The Cuckoo's Egg</u> ? It's a good old hoot, mixing computers against a backdrop of astrophysics !

:)
 
Upvote 0
Chris Davidson,

As an undergrad I double majored in Astrophysics and Psychology (LONG STORY!!). I haven't completed my degree due to money problems. Probably just go back and finish up Psychology degree and then on to a MA/PhD Cognitive Psychology program.

Nope, I haven't read that yet. Will look into that! Thanks for the recommendation!
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,974
Members
448,537
Latest member
Et_Cetera

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top