Filling backcolor cells color based on the color of a cell

jgalas

Board Regular
Joined
Jul 4, 2011
Messages
111
Office Version
  1. 2013
Platform
  1. Windows
I want, based on the color of one cell (red), to fill the 5 cells below (pink). As picture.

The cell background (red) is defined by CF.
=IF($A81="calendar";IF(MONTH(Calendar!$F$23)=$C82;DAY(Calendar!$F$23);-1);IF($A81="calendar_bi";IF(MONTH( Calendar!$AK$23)=$C82;DAY(Calendar!$AK$23);-1)))

It will be applied to several rows.

Thank you in advance for any help

1717964260840.png
 
thanks can you do me a favor as a proof of concept.
Put the CF formula for cell J15, in cells J16:J20? do not copy and paste.
IF cell J15 is still [RED], if not go one in the row that is.
Go to your CF rule editor for cell J15, and copy it the rule formula.
Then select J16:J20 and press F2, paste the CF formula in, be sure it includes the "=" sign. Then press CNTL-ENTER.
If you get all TRUES, then you have a CF rule that works. Just enter a new rule for those cells, paste the formula and select a fill color.

So... Based upon your formula above.
go to cell J16,
click conditional formatting, new rule based on formula
paste this in the formula bar:
Excel Formula:
=SE($A15="calendario";SE(MÊS(Calendario!$F$16)=$C16;DIA(Calendario!$F$16);-1);SE($A15="calendario_bi";SE(MÊS(Calendario!$AK$16)=$C16;DIA(Calendario!$AK$16);-1)))
(Yes, it is the same formula)
Select the FILL
Click OK until you get out.
I tried it and it works.
however, when cell j15 is no longer red, the 5 bellow cells formatted remain red
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Why did cell J15 become no longer red?
Did the values for the formulas in J16 to J20 change from TRUE to FALSE?

(which of these values in the CF formula changed:
$A81
Calendar!$F$23
$C82
Calendar!$AK$23 ?)
 
Upvote 0
Novamente, o que você fez para que a cor do J15 mudasse de [VERMELHO] para outra coisa?
O que você fez para deixar o J15 vermelho?
J15 data it's June 10, 2024
I have change the year to 2023 and J15 data it is now June 5, 2023.

Data (days) in range ("D15:AF15") changes depending on the month and year
$C81 contains control number
$A81 table name where to look for data (day of month and year)
 
Upvote 0
that is the reason why. You have changed the value of cell J15, but none of the components of the conditional formatting.

But, it also does not say how J15 changed color to no fill. Did you do anything else? Did you copy the date from another cell? Did you manually change the format? Please say everything you did to cell J15.
 
Upvote 0
Then your conditional formatting formula is not the one you have shared.
Where is the YEAR of any of these cells examined:
J15
$A81
Calendar!$F$23
$C82
Calendar!$AK$23

In one of my original posts I asked you to share your workbook to a file sharing service. Please do so.
 
Upvote 0
file sharing
that requires a log in and has unavoidable tracking, so it is definitely not the simplest way to share files. ;-)
Can't you use drop box, google docs, or have a microsoft OneDrive folder?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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