How to count events on a particular date

hmsbablu

New Member
Joined
Feb 3, 2006
Messages
5
I am a newbie to excel and I got some problem in counting the number of events took place on a particular date.

For Excample:

Col A1 contains the date, and Col B1 contains the details of the event. Now If on any single particular date the number of events reaches maximum three then the user should not be allowed to enter the 4th event details. And in addition a message alert box should display.

Kindly help me with some either formula or code.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Oaktree

MrExcel MVP
Joined
Jun 20, 2002
Messages
8,105
Office Version
  1. 365
Select A1:A100 (or whatever the last cell in your range is).

Go to data --> validation.

Choose to allow --> custom where the formula is =COUNTIF(A$1:A1,A1)<4. Then, click the "Error Alert" tab (in data --> validation) and enter the message you'd like to display if the user is trying to enter a 4th event for that date.

Note that copy & paste is the Achilles' Heel of data -- > validation (as copy & paste will ignore (or more specifically, replace) the validation in the target cell). If this becomes an issue, you'd have to turn to VBA.
 

Forum statistics

Threads
1,181,102
Messages
5,928,065
Members
436,586
Latest member
latintxn

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