Data Validation based on IF Statement

FRED_SHEET

New Member
Joined
Oct 13, 2017
Messages
47
I am trying to create a data validation statement for data entry into Cell B1.

Cell A1 has a data validation statement limiting data to a Whole Number between 0 and 9,999,999.

I would like a data validation statement for Cell B1 based on an IF statement.

If A1 is greater than 0 (>0) B1 would be limited to a Whole Number between 0 and 11.

If A1 is blank or equal to zero B1 can be a Whole Number between 0 and 9,999,999.

I am not sure how to write data validation statement for B1 which would accomplish this result.

Any help would be greatly appreciated.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Alex Blakenburg

Well-known Member
Joined
Feb 23, 2021
Messages
607
Office Version
  1. 365
Platform
  1. Windows
I think this is what you are looking for
Min =IF(A1>0,0,0)
Max =IF(A1>0,11,9999999)

1616547160140.png
 
Solution

Watch MrExcel Video

Forum statistics

Threads
1,130,119
Messages
5,640,218
Members
417,131
Latest member
Seanr19871

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
Top