Conditional Formatting

ChristineC

New Member
Joined
Apr 19, 2024
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello I am trying to create some conditional formatting rules:

Column J has either G, T or V within it.
Column K (lets call this Purchase date)
Column V (term date)

There are other columns I want to do but if i can get help with this I think I can manage to figure out the rest.

So what I'd like to use conditional formatting for is I would like data in Column K & V to be formatted based off the data in column J (so if J3 has G I would like column K3 & V3 to have formatting) I'm trying to grey out fields that do not apply to the category type... I've tried on own and give up...
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
K2:K100 - Change, reduce or extend the rows to meet your data range of rows

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:
=$J2="G"

Format [Number, Font, Border, Fill] format as grey
choose the format you would like to apply when the condition is true
OK >> OK

Repeat the above - BUT select
V2:V100 - Change, reduce or extend the rows to meet your data range of rows
=$J2="G"

You may be able to select K and V using control key

just tested and yes you can select the K AND V range
using
Apply to $K$2:$K$100,$V$2:$V$100
or as i say select K and then V

Book2
IJKLMNOPQRSTUVW
1
2
3
4
5
6
7
8g
9
10
11
12g
13
14
15
16g
17
18
19
20
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
K2:K30,V2:V30Expression=$J2="G"textNO


Apply to $K$2:$K$100,$V$2:$V$100
 
Upvote 0
How about this:
Book1
JKLMNOPQRSTUV
1CodePurchase DateTerm Date
2V6/28/202410/28/2024
3G6/29/202410/29/2024
4T6/30/202410/30/2024
5T7/1/202410/31/2024
6V7/2/202411/1/2024
7G7/3/202411/2/2024
8G7/4/202411/3/2024
9T7/5/202411/4/2024
10T7/6/202411/5/2024
11T7/7/202411/6/2024
12T7/8/202411/7/2024
13G7/9/202411/8/2024
14V7/10/202411/9/2024
15V7/11/202411/10/2024
16T7/12/202411/11/2024
17T7/13/202411/12/2024
18V7/14/202411/13/2024
19V7/15/202411/14/2024
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
V2:V19Expression=$J2="G"textNO
K2:K19Expression=$J2="G"textNO
 
Upvote 0
ok ... I have followed the suggested formulas. I don't know why but fields that do not meet the criteria are highlighting.. I cleared the formatting from the entire worksheet to be certain it wasn't something else I had tried.

1719587667074.png


1719587527879.png
 
Upvote 0
If your "applies to" range starts in K3, then your formula should also start as row 3, not row 5. Also, CF is smart and auto increments formula references, so you should change $J5:J102 to $J3. You don't need to use the range. CF will automatically update $J3 to $J4, $J5, $J6 etc.

So it should be
Excel Formula:
$J3="G"

And if you're going to use the entire column for V:V, then that formula should be
Excel Formula:
$J1="G"

Your CF formulas should always start with the same row as your applies to range or you will get skewed results. Whole column references start at row 1.
 
Upvote 0

Forum statistics

Threads
1,223,892
Messages
6,175,236
Members
452,621
Latest member
Laura_PinksBTHFT

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