Data validation referring to cell that has count if function

SlinkRN

Well-known Member
Joined
Oct 29, 2002
Messages
715
Hi there!
I have been trying to have a cell not allow a certain character if another cell already has counted 10 of that group of characters in that column.
For example, cell B2 has a sumproduct function that counts up a total of all "E", "p", "Q", and "O" entries in column 2 (about 100 rows in the column). I want to be able to stop someone from entering another E, p, Q, or O in column 2 if cell B2 already has a total of 10. I want a box to pop up and say something like "This shift is full, choose another". I've been playing around with it, but I can't get it to do that. Any ideas?

Column B

=sumproduct(--exact(B4:B104,{"E","O","Q","p"}))

E
O
E
Q
E
E
p

etc.
Thanks Slink
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Re: Data validation referring to cell that has count if func

The validation formula:

=B2<=10

should work. You can set the error message on the Error Alert tab.
 
Upvote 0
Re: Data validation referring to cell that has count if func

I thought that would work too, but it doesn't. I thought maybe it was because it was based on a sumproduct formula instead of an actual number.
 
Upvote 0
Re: Data validation referring to cell that has count if func

You probably need:

=$B$2<=10

if it's applied to a range. It worked for me.
 
Upvote 0
Re: Data validation referring to cell that has count if func

Ooops! Sorry, Andrew - I spoke too soon. That DOES work - I just tried it. I must not have been putting the = before the B2. Thank you so much, the simplest little thing was driving me CRAZY!! Thanks again! Slink
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,692
Members
449,117
Latest member
Aaagu

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