![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,314
|
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 |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Victoria, Australia
Posts: 761
|
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 |
|
|
|
|
|
#5 |
|
Guest
Posts: n/a
|
That works great.
Thank you both! I love this board!. I really learn alot here! Mav |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|