PDA

View Full Version : I'm trying to perform two validations on a range of cells at the same time



Mendez
07-26-2022, 04:09 PM
Hi all! This is my first ever post! :yes

I'm a total newcomer to coding with VBA, but totally keen to learn! I have a very basic knowledge of Excel and can use simple Macros and Functions etc. I actually feel I should be able to figure my problem out myself but I've had no joy finding a solution.

MY PROBLEM:

I'm basically trying to perform two validations on a range of cells at the same time. The first validation would make the user choose from a 'validation list' and the second validation would make sure there would also be no duplicate entries.

As you can see - I can get both of these validations to work individually, but I'm having trouble combining the two so they both work at the same time!

29990 29991

The validation list takes from data in these cells: ='Data Lists'!$A$2:$A$96

The code I use to prevent duplicate entries: =COUNTIF($C$3:$C$93,C3)=1


Any help would be much appreciated!!!

Paul_Hossler
07-26-2022, 05:52 PM
Maybe use 1 DV condition and Conditional Formatting to flag dups


29992

Mendez
07-27-2022, 03:22 PM
Thanks for the reply Paul - but I'm looking to validate at the data entry stage rather than searching for duplicates after all data is entered...

Paul_Hossler
07-27-2022, 05:14 PM
Thanks for the reply Paul - but I'm looking to validate at the data entry stage rather than searching for duplicates after all data is entered...

I believe my example XLSX does that. Just have the CF rules cover the same cells as the DV rules