Data Validation Question

cionnaith

Board Regular
Joined
Mar 9, 2010
Messages
52
Hi Folks.

I am trying to create cells that accept only the values of 0, 2 and 4. How do I do that using data validation. In addition, I have set up another cell to count those entries and a 0 entry needs to be counted as a value.

Any help is much appreciated.

Thanks!
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Data > Validation > Settings tab - drop down box to list and put in 0,2,4 in the source box

To count the results


=COUNT(A1:A999)
 
Upvote 0
Hi,

Jim's solution is the way I would go, however you could also do this if you don't want to have a listbox:

=NOT(AND(A1<>0,A1<>2,A1<>4))
 
Upvote 0
James,

Out of curiosity, why not use:
Code:
=OR(G2=0,G2=2,G2=4)
Jack

(In Data->Data Validation->Settings->Allow: Custom under formula)
 
Upvote 0
James,

Out of curiosity, why not use:
Code:
=OR(G2=0,G2=2,G2=4)
Jack

(In Data->Data Validation->Settings->Allow: Custom under formula)

Because I always seem to come up with a difficult way to solve and easy problem ;-) It's a bad habit.
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,812
Members
452,945
Latest member
Bib195

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