Change the background colour of a row??

Geek Girl 007

Board Regular
Joined
Mar 12, 2022
Messages
127
Office Version
  1. 2021
Platform
  1. Windows
Can I change the background of all the cells in this row if one of the cells has PH in it?
I was looking at Conditional Formatting because I already have SUM's etc in a couple of the cells.
Thank you in advance :)
 

Attachments

  • Untitled.png
    Untitled.png
    8.9 KB · Views: 2

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi,

If "PH" is in G4

Book3.xlsx
ABCDEFG
1
2
3
4PH
Sheet1041
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A4:F4Expression=$G4="PH"textNO
 
Upvote 0
Hi jtakw,
It would seem like you're my saviour at the moment.
How do I set this? would it make a difference that the cell with PH (stands for Public holiday) might have different text in it?
 
Upvote 0
Hi jtakw,
It would seem like you're my saviour at the moment.
How do I set this? would it make a difference that the cell with PH (stands for Public holiday) might have different text in it?

Your pic did not show any Column or Row IDs, so will need that info.
By "different text", do you mean combined with PH, (e.g. ABC PH DEF), or just something else?
Give samples for clarification.

Consider using XL2BB to post samples (see my signature), or at least in Table format, for future reference.
 
Upvote 0
1647200462278.png

It's a drop down menu...

Column I has this formula in it =IF((F14-E14)+(H14-G14)=0,"",IF(H14-G14<0,"",(F14-E14)+(H14-G14)))
What odd with this formula is that when you fill out it doesn't work until i put the last number in:
1647200711586.png
1647200755348.png

I don't mind that it does this, just thought I'd mention it :)
 
Upvote 0
Ok.

Select E14:J18, starting at E14.
Home tab, Conditional Formatting, New Rule
Use formula
Enter formula exactly as shown
Format, pick your Fill color, OK.

Book3.xlsx
EFGHIJK
14PH
15
16
17
18PH
Sheet1053
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E14:J18Expression=$K14="PH"textNO


This will highlight E:J on any of the rows that has "PH" in column K.
 
Upvote 0
I'm so sorry, now I feel like i'm really dumb.
I'm stuck entering your formula here:
1647202853482.png


I'm so sorry, I am still learning, I downloaded XL2BB and will install it tonight.
Thank you
 
Upvote 0
In that Center box, that's where you enter the formula.
Then, lower right, click "Format"
Then, click the "Fill" tab on top Right
Choose your color, then click OK.
 
Upvote 0
1647203524054.png

This is what I did, but it didn't work :(
When I went into 'Manage Rules' this it what came up:
1647203743445.png
 
Upvote 0
No, enter Only the formula, like this:

=$K14="PH"

You'll now need to delete formatting from those cells, if any, and start again.
 
Upvote 0

Forum statistics

Threads
1,214,857
Messages
6,121,948
Members
449,056
Latest member
FreeCricketId

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