PDA

View Full Version : Conditional Formatting with Multiple Criteria



SARFRAZ_1205
03-06-2018, 01:36 AM
Dear Sir,
I wanted to highlight duplication entries based on multiple conditions.
Example: if Column C that is entry date, Column E Vehicle number, Column G Type of expenses if same then Column B entry number should be highlighted as duplicate entry.
Example: if Column C that is entry date, Column E Vehicle number is same but columns G Type of expenses are not same then Column B entry number should not be highlighted as duplicate entry.

werafa
03-06-2018, 02:48 AM
Hi,

you can use the conditional formatting to highlight duplicate values.
If the duplication requires testing of values in more than one column, you can create a test string by concatenating cell values.

to try this, put "C" in cell a1, "1" in cell b1, and "=a1 & b1" in cell c1.

you can use this to create the test value from which you can use the find duplicates/conditional formatting features

p45cal
03-06-2018, 06:57 AM
In the attached, conditional formatting has been applied to cell B2:B5. The formula used therein has also been put in column K. This is only FYI and doesn't need to be there.
The columns referred to in the formula may not be the correct ones since what you assk for in msg#1 here and in the Excel file are different. You can easily adjust the CF formula to suit.
(The formula is along the lines of: =SUMPRODUCT(--($B$2:$B$5=B2),--($C$2:$C$5=C2),--($G$2:$G$5=G2))>1 which can be shortened: =SUMPRODUCT(($B$2:$B$5=B2)*($C$2:$C$5=C2)*($G$2:$G$5=G2))>1)