How to verification on a calculator field

Derm_N

New Member
Joined
Mar 16, 2021
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hello All,

I do hope that someone can help me with this problem I am having...

What I am trying to do is set a "Whole Number" verification on a calculator field.....

The Calculation is on the "Number of Boxes" which is "Qty Ordered" / "Box Qty"

So what I am looking to do is set a verification on the "Number of Boxes" Field.....


1615912321281.png


Any idea's?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Welcome to the Board!

I think the ROUNDUP function should do what you want.
Use this formula in cell C2 and copy down:
Excel Formula:
=ROUNDUP(A2/B2,0)
 
Upvote 0
Thank you for your reply on this - would the ROUNDUP just round it up....

What I am trying to get is the that the "Number of Boxes" would give a verification error as it isn't a Whole Number....
 
Upvote 0
You could do something like this:
Excel Formula:
=IF(MOD(A2/B2,1)>0,"ERROR!",A2/B2)
 
Upvote 0
Solution
Thank you all for your reply on this....

I will try these and let you know - Very helpful site....
 
Upvote 0
You could do something like this:
Excel Formula:
=IF(MOD(A2/B2,1)>0,"ERROR!",A2/B2)
I misread the question originally so my previous "answer" does not do what the OP wanted. With your solution, though, I think it might (not sure about it how it would apply to the OP's question) needs to be modified to this...

=IF(MOD(MAX(A2,B2)/MIN(A2,B2))>0,"ERROR!",A2/B2)

since the order of division matters. One caveat... if the minimum value could be 0, then the formula would have to be modified to handle the error dividing by 0 produces.
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,581
Members
449,089
Latest member
Motoracer88

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