Data Validation of a Cell must be a whole number less than or equal to another cell

chris_bosten

New Member
Joined
Aug 21, 2024
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm looking for a custom data validation formula for all the cells in column D to be a whole number less than or equal to a corresponding value on the same row in column I.


Module NameSpecialismTrainerNumber of TraineesNames of TraineesDay of WeekTraining Module IDTraining Duration (hrs)Maximum Participants
FFS1AggregatesSte3A, B, CMondayPATR0173.55

Number of trainees in every row must not exceed the value in "maximum participants" in their respective row

Can you help?

Best wishes
Chris
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
in data validation , use custom
and formula is
=AND(D2=INT(D2),D2<=I2)

i have added data validation and also show the formula in K2

Book1
ABCDEFGHIJK
1Module NameSpecialismTrainerNumber of TraineesNames of TraineesDay of WeekTraining Module IDTraining Duration (hrs)Maximum Participants
2FFS1AggregatesSte5A, B, CMondayPATR0173.55TRUE
Sheet1
Cell Formulas
RangeFormula
K2K2=AND(D2=INT(D2),D2<=I2)
Cells with Data Validation
CellAllowCriteria
D2Custom=AND(D2=INT(D2),D2<=I2)
 
Upvote 0
Another way is to use one of the standard Data Validation methods rather than 'Custom'..

1733824124577.png
 
Upvote 0
Solution
much better way , I saw whole number but did not realise it had a MIN and MAX value - dah!! - should have looked
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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