How to establish if a division result is a whole number

Tbred

New Member
Joined
Jul 23, 2024
Messages
3
Office Version
  1. 365
Platform
  1. MacOS
If am currently trying to establish an IF formula where the True or False revolves around a division result being a whole number.
The If at present is - =(IF('Project Inputs'!$P$14-'Project Inputs'!$P$13<>Assumptions!O9,0,(('Project Inputs'!$P$42*'Project Inputs'!$P$10))))
Row O is a number from 1 through 30.
Project Inputs are number P14 minus P13, in this case the answer is 5. It may be different.
I need to check if the number in row O will divide exactly by the result of P14 minus P13. If it does the resultant multiplication, if not zero.
My formula only works correctly at 5, not for instance 15 or 25.
Help greatly appreciated, I hope I have explained clearly enough.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
You'll likely be looking for the MOD function here. It will provide the remainder for a division equation. For example:

=IF(MOD('Project Inputs'!$P$14-'Project Inputs'!$P$13,Assumptions!O9)=0,"whole","not whole")
 
Upvote 0
Another option
Excel Formula:
=('Project Inputs'!$P$42*'Project Inputs'!$P$10)*(mod('Project Inputs'!$P$14-'Project Inputs'!$P$13,O9)=0)
 
Upvote 0
Solution
You'll likely be looking for the MOD function here. It will provide the remainder for a division equation. For example:

=IF(MOD('Project Inputs'!$P$14-'Project Inputs'!$P$13,Assumptions!O9)=0,"whole","not whole")
Thanks for your quick reply Candyman. I gave your suggestion a try. I seem to be encountering the same problem. When I get to O9 which is the number 5, I get "whole". However, when I reach X9 and the number in that cell is 10, I get "Not Whole" when I would need it to be "Whole". Maybe it is my poor explanation. Thanks anyway.
 
Upvote 0
Thanks Fluff, with your help worked it out.
=(IF(MOD(O9,('Project Inputs'!$P$14-'Project Inputs'!$P$13)),0,(('Project Inputs'!$P$42*'Project Inputs'!$P$10))))
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,221,634
Messages
6,160,965
Members
451,681
Latest member
Northern NY Design

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