-1

We all know how to prevent duplicates in excel by using data validation and the custom formula : =COUNTIF($A:$A;A1)=1 for example.

but I need to add a time condition, so every day I'm typing some numbers in a row and these numbers must be unique in the that day.

So there must be no duplicates entries in the same day but can be typed tomorrow also one time and so on.

Raystafarian
  • 21,743
  • 12
  • 62
  • 90
  • Store the date with the time and format the cell to not show the date perhaps? – Jonno Mar 02 '16 at 17:00
  • the time is not an entry it's only a condition the numbers typed are the entries like if I type in A1 : 67 and I want to type it again in A2 I cant do it only today so if tomorrow I want to type 67 in A2 it's possible and so on – Said Khattabi Mar 02 '16 at 17:05
  • So you want it to prevent you entering duplicates on a certain day, but allow them again the next..? – Jonno Mar 02 '16 at 17:09
  • Okay, where are you typing these? How many are you typing? What are they? – Raystafarian Mar 02 '16 at 17:16
  • @Jonno yes you are exactly right but in the next day also no duplicates – Said Khattabi Mar 02 '16 at 17:44
  • @Raystafarian I'm typing only numbers, up to 300 per day, using a simple worksheet – Said Khattabi Mar 02 '16 at 17:46
  • So not all at once? What are they for? – Raystafarian Mar 02 '16 at 17:47
  • @Raystafarian so I'm managing a groupe of people 300 exactly, each one has a number when they come to my shop I type their number to check, every one is allowed to come only once in a day so to prevent any fraud I need to prevent duplicates entries in the same day – Said Khattabi Mar 02 '16 at 17:53
  • Okay, I'll see if I can figure something out. – Raystafarian Mar 02 '16 at 18:05
  • You have to have the date entered onto your spreadsheet somehow. this post explains how you can do that. After that building the conditional formatting to check for duplicates is a simple manner of converting your countif() to countifs() – Kyle Mar 02 '16 at 18:05
  • @Kyle I'm using a VBA code that print automatically the date+time I need only the last step :) – Said Khattabi Mar 02 '16 at 18:13

1 Answers1

0

Should just work with a countifs

=COUNTIFS($B:$B,B1,$A:$A,A1)=1

Assuming dates are in A and numbers are in B.

Setup like this -

enter image description here

Now, let's see what happens with a repeat -

enter image description here

It works! But wait, what about different dates?

enter image description here

SUCCESS!

Raystafarian
  • 21,743
  • 12
  • 62
  • 90