ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   check if an entry is a multiple of another cell (https://www.excelbanter.com/excel-worksheet-functions/186035-check-if-entry-multiple-another-cell.html)

JMM[_2_]

check if an entry is a multiple of another cell
 
I am creating an order form in which I have cells that are used to enter a
certain quantity of pencils. The pencils must be ordered in multiples of 12.
How can I use Data Validation to check if the ordered quantity is always a
multiple of 12?

Thanks,
JM


ExcelBanter AI

Answer: check if an entry is a multiple of another cell
 
Hi JM,

You can use Data Validation in Excel to check if the ordered quantity is always a multiple of 12. Here are the steps:
  1. Select the cell or cells where you want to apply the validation.
  2. Go to the Data tab in the ribbon and click on Data Validation.
  3. In the Data Validation dialog box, select "Custom" from the "Allow" drop-down list.
  4. In the "Formula" field, enter the following formula:
    Formula:

    =MOD(A1,12)=

    (assuming that the cell you want to validate is A1).
  5. Click on the "Error Alert" tab and enter a suitable error message, such as "Please enter a multiple of 12".
  6. Click OK to close the dialog box.

Now, whenever someone enters a quantity in the selected cell(s), Excel will check if it is a multiple of 12. If it is not, an error message will appear.

Mike H

check if an entry is a multiple of another cell
 
Hi,

Select those cells (say a1 - a100) then use data validation formula

=MOD(A1,12)=0

Mike

"JMM" wrote:

I am creating an order form in which I have cells that are used to enter a
certain quantity of pencils. The pencils must be ordered in multiples of 12.
How can I use Data Validation to check if the ordered quantity is always a
multiple of 12?

Thanks,
JM



JE McGimpsey

check if an entry is a multiple of another cell
 
You've gotten an accurate answer, but for the convenience of your users,
why don't you just let them order by the dozen (i.e, 1,2..., instead of
12,24...)
?



In article ,
"JMM" wrote:

I am creating an order form in which I have cells that are used to enter a
certain quantity of pencils. The pencils must be ordered in multiples of 12.
How can I use Data Validation to check if the ordered quantity is always a
multiple of 12?


Jerome[_2_]

check if an entry is a multiple of another cell
 
That was exactly the formula I was looking for. Thank you so much!



"Mike H" wrote in message
...
Hi,

Select those cells (say a1 - a100) then use data validation formula

=MOD(A1,12)=0

Mike

"JMM" wrote:

I am creating an order form in which I have cells that are used to enter
a
certain quantity of pencils. The pencils must be ordered in multiples of
12.
How can I use Data Validation to check if the ordered quantity is always
a
multiple of 12?

Thanks,
JM




Jerome[_2_]

check if an entry is a multiple of another cell
 
That's because of how our system was set up. I agree with you that it would
be easier to order units instead of pieces.



"JE McGimpsey" wrote in message
...
You've gotten an accurate answer, but for the convenience of your users,
why don't you just let them order by the dozen (i.e, 1,2..., instead of
12,24...)
?



In article ,
"JMM" wrote:

I am creating an order form in which I have cells that are used to enter
a
certain quantity of pencils. The pencils must be ordered in multiples of
12.
How can I use Data Validation to check if the ordered quantity is always
a
multiple of 12?




All times are GMT +1. The time now is 12:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com