Formula for a fraction

Christy

New Member
Joined
Feb 19, 2002
Messages
13
Hello All,
I need a formula in cell U24 that will look at the result in cell J16 and, if it sees a fraction, it will divide only the fraction part of the number into 42.
Here's an example:

cell J16 contains 12.6
cell U24 will divide 42 by .6, round that result up to nearest whole number
and display 26
If cell J16 contains a whole number with no decimal, cell U24 will display 0.
Thank you so much for any help you can provide!
~Christy
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
On 2002-03-09 13:26, Christy wrote:
Hello All,
I need a formula in cell U24 that will look at the result in cell J16 and, if it sees a fraction, it will divide only the fraction part of the number into 42.
Here's an example:

cell J16 contains 12.6
cell U24 will divide 42 by .6, round that result up to nearest whole number
and display 26
If cell J16 contains a whole number with no decimal, cell U24 will display 0.
Thank you so much for any help you can provide!
~Christy

42 divided by 0.6 is 70. I don't understand how you arrived at 26. Can you clarify?
 
Upvote 0
The following seems to give the result you want, but I'd test it with other values also: -

=IF(INT(J16)<>J16,ROUNDUP(42*(J16-INT(J16)),0))
 
Upvote 0
On 2002-03-09 13:26, Christy wrote:
Hello All,
I need a formula in cell U24 that will look at the result in cell J16 and, if it sees a fraction, it will divide only the fraction part of the number into 42.
Here's an example:

cell J16 contains 12.6
cell U24 will divide 42 by .6, round that result up to nearest whole number
and display 26
If cell J16 contains a whole number with no decimal, cell U24 will display 0.
Thank you so much for any help you can provide!
~Christy

Christy,

=IF(J16-INT(A16),ROUND(42/(J16-INT(J16)),0),0)

I get 70, not 26 when J16 is 12.6. Is that wrong.

Aladin
 
Upvote 0
Thank you so much! I'm sorry for the mistake, it *is* supposed to be 42 *.06 and Mudface's answer works perfectly - Thank you all soooooo much!
~Christy
 
Upvote 0

Forum statistics

Threads
1,213,565
Messages
6,114,338
Members
448,569
Latest member
Honeymonster123

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