Data Validation with conditions

Fahad987

New Member
Joined
Nov 29, 2021
Messages
6
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
Hi,

I am working on setting up custom data validation as data is entered by the user. I have two columns A and B. In column A, i enter today's date (not using today() function). It is a named range with name "myDate". In column B, i type in customer names. however, sometimes there are a lot of customer names to enter and one or two names get typed again. I want to apply data validation on column B such that for only today's entries, if i happen to enter any customers' name twice in column B, the data validation rule prompts me that it has already been entered. For now, i am trying to enter this into my custom data validation rule:
=IF(myDate=today(), Countif($B$2:$B$50,B2)=1, 0)
But it does not restrict any duplicate entries in column B. When I use this countif formula without the IF condition only on column B data range, it works fine.

My Current data structure:

ColumnA ColumnB
myDate CustomerNames
29-11-2021 ABC
29-11-2021 LMN
30-11-2021 ABC
30-11-2021 LMN
30-11-2021 XYZ
30-11-2021 ABC <--- Here it should give me error message but only based on today's datewise entries.

I need this date conditional check because for the next day, i will resume data entries from right beneath my today's entries. So help from forum members here would be really great.
 
Thanks to both of you Fluff and Peter. You both are indeed helpful. Looking forward to having your guidance again should i come up with any new challenge beyond my present knowledge :) (y)
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,449
Members
448,966
Latest member
DannyC96

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