Beginner needs help with counting and formatting please

Carl_London

New Member
Joined
Feb 28, 2023
Messages
19
Office Version
  1. 2016
Platform
  1. Windows
Hi!

I have a worksheet that needs to look like this:

Row 1 is the header row
Column C should show Good and format Green if it the first entry where the combination of Column A and B is disinct (is that the correct word?)
Column C should show Duplicate for any subsequent entries where the combination of Column A and B has already appeared higher
Column C should remain blank and not count where either or both of Column A or B are blank, I may need add additional rows

Cell C13 should count and display the total number of entries
Cell C14 should count and display the number of good entries
Cell C15 should count and display the number of duplicate entries

I am getting myself of a muddle, any help for this newbie would be very very welcome.

1695642852336.png


Thanks for any help!

Carl
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
try:
Mr excel questions 66.xlsm
ABC
1NamePlaceStatus
2GQDJNPOYGood
3QKPVOEFWGood
4PZBEFWHMGood
5 
6QKPVOEFWDuplicate
7ONMO 
8WWZBTASDGood
9QKPVOEFWDuplicate
10MFKX 
11QPEOXJFBGood
12
13Total:10
14Good:5
15Duplicate:2
Carl London
Cell Formulas
RangeFormula
C2:C11C2=IF(OR(A2="",B2=""),"",IF(COUNTIFS($A$2:$A2,A2,$B$2:$B2,B2)>1,"Duplicate","Good"))
C13C13=COUNTA(C2:C11)
C14C14=COUNTIF(C2:C11,"Good")
C15C15=COUNTIF(C2:C11,"Duplicate")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:C11,C13Expression=IF(OR(A2="",B2=""),"",IF(COUNTIFS($A$2:$A2,A2,$B$2:$B2,B2)>1,"Duplicate","Good"))="Good"textNO
C2:C11,C13Expression=IF(OR(A2="",B2=""),"",IF(COUNTIFS($A$2:$A2,A2,$B$2:$B2,B2)>1,"Duplicate","Good"))="Duplicate"textNO
 
Upvote 0
Solution
Thank you very much Awoohaw! You're awesome :)

I could also do with a pointer on the totals at C13, C14, C15

Thanks again for you help,

Carl
 
Upvote 0
You're welcome, and thanks for the feedback.
Cell C13 uses the COUNTA function. COUNTA counts all cells that are not empty, a "" or a formula that results in "" is not empty.
Cell C14 and C15 use the same function I use in the Conditional Formatting and Formulas in the cells C2:C11. COUNTIF and COUNTIFS. It counts cells where only the criteria is/are met.

Best Wishes to you too!
 
Upvote 0

Forum statistics

Threads
1,215,145
Messages
6,123,289
Members
449,094
Latest member
GoToLeep

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