Data Validation Question

G

Guest

Guest
I want cell B2 to have data validation so that number being entered is a number that can be evenly divided by the number in cell A2.

I'm sure this is an easy one for most of you, but I don't know how to write this formula.

Thanks for any help.

Mav.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Is that

=MOD(B2,A2)=0

what you're looking for?

If so, you'll need to choose 'Custom' in the Data Validation window and enter the above in the Formula box.

Aladin
 
Upvote 0
I'm not sure if that is what I need.

If I have "10" in A1, I want only numbers divisible by 10 to be allowed in B2.

And if I change A1 from "10" to "16", only numbers that can be divided by 16 will be allowed in B2.

Thanks!

Mav
 
Upvote 0
Aladins formula works. Select cell B2, Go to Data menu, select validation. In the allow box choose custom, in the formula box, type Aladin's formula. If you enter 10 in A2, only multiples of 10 can subsequently be entered in B2. If you change A2 to 16, it won't throw up an error immediately if B2 isn't divisible by 16, but if you try to enter a number indivisible ny 16, it will.
Richard
 
Upvote 0
That works great.

Thank you both!

I love this board!. I really learn alot here!

Mav
 
Upvote 0

Forum statistics

Threads
1,213,506
Messages
6,114,027
Members
448,543
Latest member
MartinLarkin

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