Conditional format help

khollibygolli

New Member
Joined
Apr 17, 2023
Messages
12
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
  2. Web
I am trying to highlight duplicates of column C that are SKU product codes on Google Sheets. I currently have =COUNTIF($C$3:C3,C3)>1
My SKUs are 9 characters long but I only want the format to highlight if the 6th-9th characters are a match is this possible?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Joe's formula works for me
Fluff.xlsm
C
1
2
3E07000125
4E08000032
5E08000019
6E07000198
7E07000166
8E08000034
9E06000047
10E08000033
11E07000125
12E07000030
13E08000033
14E08000016
15E08000019
16E07000166
17E07000047
18E06000052
19E07000047
20E07000117
21E06000049
22E08000033
23E06000052
24E07000125
25E07000080
26E08000001
27E06000047
28E08000032
29E08000027
30E07000007
31E07000080
32E07000050
33E07000037
Main
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C3:C33Expression=SUMPRODUCT(--(MID(C$3:C3,6,4)=MID(C3,6,4)))>1textNO
 
Upvote 0
It didn't work for me . Just made all my blank spaces highlighted
Sounds to me like you are also applying it to blank cells (you did not mention that).
If you want to ignore the blank cells, then try this version:
Excel Formula:
=SUMPRODUCT(--(C$3:C3<>""),--(MID(C$3:C3,6,4)=MID(C3,6,4)))>1

If that is not working for you, then you may be applying the Conditional Formatting formula incorrectly (many people mix that part up, applying the formula to the correct range).
Tell us what you have done, exactly.
 
Upvote 0
Solution
Did this one work for you Joe? Please test your solutions and try your formulas before posting them ;)
Yes, I test my solutions, as should you!
You obviously didn't test mine either!
 
Upvote 0
Sounds to me like you are also applying it to blank cells (you did not mention that).
If you want to ignore the blank cells, then try this version:
Excel Formula:
=SUMPRODUCT(--(C$3:C3<>""),--(MID(C$3:C3,6,4)=MID(C3,6,4)))>1

If that is not working for you, then you may be applying the Conditional Formatting formula incorrectly (many people mix that part up, applying the formula to the correct range).
Tell us what you have done, exactly.
 

Attachments

  • Screenshot 2023-04-17 121420.png
    Screenshot 2023-04-17 121420.png
    26.9 KB · Views: 6
  • Screenshot 2023-04-17 121330.png
    Screenshot 2023-04-17 121330.png
    13.1 KB · Views: 5
  • Screenshot 2023-04-17 121458.png
    Screenshot 2023-04-17 121458.png
    38.8 KB · Views: 5
Upvote 0
Is this for Excel, or for Google Sheets?
 
Upvote 0
Your "Apply To" range does not coincide with the formula (this is the common mistake that people often make).
You have the formula starting with cell C3, but your "Apply To" range set to C1:C1000.
Change your "Apply To" range to "C3:C1000" and re-enter the formula.

Your Conditional Formatting formula must reflect the very first cell in your "Apply To" range.
 
Upvote 0
Your "Apply To" range does not coincide with the formula (this is the common mistake that people often make).
You have the formula starting with cell C3, but your "Apply To" range set to C1:C1000.
Change your "Apply To" range to "C3:C1000" and re-enter the formula.

Your Conditional Formatting formula must reflect the very first cell in your "Apply To" range.
Thank you very much! Not only did I have the C1 C3 wrong but also when having multiple formulas in a column, the order they are arranged matters as well. I moved the sumproduct formula to the top and now it works!!!
 

Attachments

  • Screenshot 2023-04-17 131145.png
    Screenshot 2023-04-17 131145.png
    72.6 KB · Views: 6
  • Screenshot 2023-04-17 131034.png
    Screenshot 2023-04-17 131034.png
    71.8 KB · Views: 6
Upvote 0
You are welcome!
Glad we were able to get it all sorted out.
 
Upvote 0

Forum statistics

Threads
1,223,311
Messages
6,171,363
Members
452,397
Latest member
ddneptune

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