Conditional formatting - highlight text cells based on values other column

smide

Board Regular
Joined
Dec 20, 2015
Messages
162
Office Version
  1. 2016
Platform
  1. Windows
Hello.


In columns A, B and C (A2:C600) I have a lists of different towns (column A), customer names (column B) and buying price for each customer in column C.


In columns D and E I'm receiving new list (towns and customers).


I'm monitoring top 3 customers from each town (top 3 buying prices) and I would like to mark cells for those top 3 cutomer names (column B) IF those names do not appear on new list (columns D and E).


*note: same name could appear in two different towns

example.


ABCDEF
1
2Town1Name19Town1Name1
3Town1Name25Town1Name2
4Town1Name312Town1Name4
5Town1Name425Town1Name5
6Town1Name50Town2Name15
7Town2Name611Town2Name8
8Town2Name74Town2Name6
9Town2Name82Town3....
10Town2Name919....
11Town2Name107
12Town2Name1128
13Town3...
14........

<tbody>
</tbody>


explanation:

- top 3 customers from Town1 are Name4 (25), Name3 (12) and Name1 (9), in new list (columns D and E) customer from top 3 Name3 does not appear so highlight cell containing Name3 in column B (bold text)
- top 3 customers from Town2 are Name11 (28), Name9 (19) and Name6 (11), in new list (columns D and E) customers from top 3 Name11 and Name9 both does not appear so higlight both cells in column B (bold text)
 
Last edited:

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
smide, try this....

Edit the following formula and change my 200 row max of ranges to be your expected maximum rows.
Select your desired range in column B and Conditional Formatting > New Rule > Use Formula

Paste in your revised formula and set the bold font format.

Rich (BB code):
  =AND(SUMPRODUCT(($D$2:$D$200&$E$2:$E$200=IF(C2>LARGE((A$2:A$200=A2)*C$2:C$200,4),A2&B2,""))*1) =0,IF(C2>LARGE((A$2:A$200=A2)*C$2:C$200,4),A2&B2,"")>"").

Hope that helps.
 
Upvote 0
Here is an alternative CF formula after selecting B2:Bxx.

Excel Workbook
ABCDE
1
2Town1Name19Town1Name1
3Town1Name25Town1Name2
4Town1Name312Town1Name4
5Town1Name425Town1Name5
6Town1Name50Town2Name15
7Town2Name611Town2Name8
8Town2Name74Town2Name6
9Town2Name82Town3
10Town2Name919
11Town2Name107
12Town2Name1128
13
CF
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B21. / Formula is =AND(B2<>"",C2>=AGGREGATE(14,6,C$2:C$600/(A$2:A$600=A2),3),COUNTIFS(D$2:D$600,A2,E$2:E$600,B2)=0)Abc
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,072
Latest member
DW Draft

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