conditional format with cell and wildcard

rjmdc

Well-known Member
Joined
Apr 29, 2020
Messages
672
Office Version
  1. 365
Platform
  1. Windows
hi
how would i conditionally format fill an entire row if column E contains "partial"
same if column J contains "deductions"
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
various ways
countif()
Match()

select the range you want to highlight - lets say A2 to D100
Now as you started at row 2 - then the formula in conditional formatting needs to start at row 2

=MATCH("*PARTIAL*",$E2,0)
=COUNTIF($E2,"*PARTIAL*")
the * is a wildcard

Same with J - BUT do you mean BOTH Eand J contains the words ?
SO E2 and J2

=COUNTIFS($E2,"*PARTIAL*",$J2,"*DEDUCTIONS*")
both have to exist

for 2007, 2010 , 2013 or 2016 excel version
Conditional Formatting

Highlight applicable range >>

A2:D100


Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:


=COUNTIFS($E2,"*PARTIAL*",$J2,"*DEDUCTIONS*")


FormatÖ [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK
 
Upvote 0
sorry i meant:
e has partial format row fill blue
j has deductions fill row green
table begins headers row2 and keeps growing
 
Upvote 0
ok, so two rules
BUT what colour if partial is in say E2 AND J2 has deductions
 
Upvote 0
red lets say i never thought of that possibility
 
Upvote 0
Book4
ABCDEFGHIJKL
1
2fred
3dicdeductions
4harry
5h partial b
6c partial f
7harry
8john
9partialfred
10dic
11harry
12h deductions b
13c partial f
14deductions
15john
16
17
18
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:L17Expression=COUNTIF($J2,"*Deductions*")textNO
A2:L17Expression=COUNTIF($E2,"*Partial*")textNO
 
Upvote 0
Added the RED
BUT the order of the rules are import , red first and then stop if true

Book4
ABCDEFGHIJKLM
2fred
3dicdeductions
4harry
5h partial b
6c partial fd d deductions f f
7harry
8john
9partialfred
10dic
11harry
12h deductions b
13c partial f
14deductions
15partialdeductions
16
17
18
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:L17Expression=COUNTIFS($E2, "*Partial*",$J2,"*Deductions*")textYES
A2:L17Expression=COUNTIF($J2,"*Deductions*")textYES
A2:L17Expression=COUNTIF($E2,"*Partial*")textYES
 
Upvote 0
you select the area you want to format
so if a table Yes the entire area
what range is the table in ?
 
Upvote 0
do i select tyhe entire table and then add the conditional formatting?
 
Upvote 0

Forum statistics

Threads
1,215,347
Messages
6,124,421
Members
449,157
Latest member
mytux

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