Condition for repeated Data appearence


Hello everyone,

I am seeking your help with this query.

I was searching for a way to condition formatting a cell that contains data or even a way of writing down a macro to make a pop-up message or an alert to notify me or makes me notice that this ATM ID has been selected and appeared more than 3 times within 3 days. 

So what I want is whenever I select the ATM ID and once it Appears in cell A5021, I want excel to count how many times the Data was selected and appeared in cell A5021 so that when it counts to 3 or more I want to be notified with a pop- up message saying that this is a repeated selection/appeared.


Let's have an example to understand what I am trying to do/say...

First, the sheet does not have any functions regarding the Today, Days, or Date functions.

The sheet simply has a lot of data with the filter option activated and as you can see the little grayed cell is an option button so that I can click on it and send an email based on a macro. So when I select from the filter any ATM ID it also appears at Cell A5021 & B5021 as you can see with the screenshot

the " QNB0003 for example not particularly " was selected from the data and the ID and the Location were reflected the same in cells A5021 & B5021.

so what I want to do is make a macro or a function to count how many times the "QNB0003 or any other data get selected" appeared so that if it counts 3 or more within the same day or within 3 days it gives me a pop-up message as an indicator that it's a repeated.


Please I am in need of your help and experience in these kinds of things so if you need more information or explanation about all of this in case you do not get exactly what I want to say or do, Kindly just ask me to explain it so that we can solve this query.





3 Replies

Kindly note that it's similar to an If statement as I am trying to say to Excel that " count what appears in cell A5021 to see how many times it appears and If you see data in Cell A5021 and was selected/appeared 3 times or more through the day or the next 3 days starting from the day we are currently at, then Highlight the cell or show me a message as a reminder saying that this data that was selected or seen multiple times is repeated."



=If( logical test is to count if the "QNB0003 or any selected data from the filter" ( for example ) appears 3 times or more, value if true then highlight the cell or show me a message to tell me it's repeated, value not true ignore till the data is selected or appears 3 times at least or more to be repeated.)

to put it in simple words I want to find a formula or macro to count the occurrences of text that would appear in Cell A5021 and then make a condition that if it occurs 3 times or more within a day or the next three days either give me a pop-up message or highlight the cell as an indicator that the one appeared in cell A5021 is often occurs
any ideas?