Cell O5,P5, Q5,R5 & S5 are merged and contains one value. I need O7 to S9 to be conditionally formatted based on the value of Cells O5 TO S5. Request

anildubey

New Member
Joined
Jan 8, 2021
Messages
11
Office Version
  1. 2013
Platform
  1. Windows
Cell O5,P5, Q5,R5 & S5 are merged and contains one value.
I need O7 to S9 to be conditionally formatted based on the value of Cells O5 TO S5.
Request please help urgently
 
Hi, you can try like this with the "using a formula" method of conditional formatting.

The formula is
Excel Formula:
=LEFT(LOOKUP(2,1/($E$5:E$5<>""),$E$5:E$5),1)="S"
which is applied to
Excel Formula:
E7:BB19

Book3
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABB
1
2JANFirst Date01/01/2021Last Date31/01/2021
3
4In OutWNOTIn OutWNOTIn OutWNOTIn OutWNOTIn OutWNOTIn OutWNOTIn OutWNOTIn OutWNOTIn OutWNOTIn OutWNOT
5Sr. No.NameidgenFriSatSunMonTueWedThuFriSatSun
601/01/202102/01/202103/01/202104/01/202105/01/202106/01/202107/01/202108/01/202109/01/202110/01/2021
71ALB1
82BS11
93DFRTda215
104ERTY25
115UYTR58
126FGHTR98
137GHIK112
148Harneet Kaur369
159LKK250
1610TKK589
1711KK28
1812LL33
1913MM366
Sheet1
Cell Formulas
RangeFormula
M2M2=DATEVALUE("1"&C2)
R2R2=EOMONTH(M2,0)
E5,AX5,AS5,AN5,AI5,AD5,Y5,T5,O5,J5E5=TEXT(E6,"ddd")
E6E6=M2
J6,AX6,AS6,AN6,AI6,AD6,Y6,T6,O6J6=IF(E6<$R$2,E6+1,"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E7:BB19Expression=LEFT(LOOKUP(2,1/($E$5:E$5<>""),$E$5:E$5),1)="S"textNO
Hi, you can try like this with the "using a formula" method of conditional formatting.

The formula is
Excel Formula:
=LEFT(LOOKUP(2,1/($E$5:E$5<>""),$E$5:E$5),1)="S"
which is applied to
Excel Formula:
E7:BB19

Book3
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABB
1
2JANFirst Date01/01/2021Last Date31/01/2021
3
4In OutWNOTIn OutWNOTIn OutWNOTIn OutWNOTIn OutWNOTIn OutWNOTIn OutWNOTIn OutWNOTIn OutWNOTIn OutWNOT
5Sr. No.NameidgenFriSatSunMonTueWedThuFriSatSun
601/01/202102/01/202103/01/202104/01/202105/01/202106/01/202107/01/202108/01/202109/01/202110/01/2021
71ALB1
82BS11
93DFRTda215
104ERTY25
115UYTR58
126FGHTR98
137GHIK112
148Harneet Kaur369
159LKK250
1610TKK589
1711KK28
1812LL33
1913MM366
Sheet1
Cell Formulas
RangeFormula
M2M2=DATEVALUE("1"&C2)
R2R2=EOMONTH(M2,0)
E5,AX5,AS5,AN5,AI5,AD5,Y5,T5,O5,J5E5=TEXT(E6,"ddd")
E6E6=M2
J6,AX6,AS6,AN6,AI6,AD6,Y6,T6,O6J6=IF(E6<$R$2,E6+1,"")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E7:BB19Expression=LEFT(LOOKUP(2,1/($E$5:E$5<>""),$E$5:E$5),1)="S"textNO

Great Help Form R. Your formula worked for me. Great Work & Expertise. Also, for my understanding would request please can you please unfold the formula bit by bit for my deep understanding.
Once again your solution is Marvelous. Great Regards
 
Upvote 0

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi,

This part LOOKUP(2,1/($E$5:E$5<>""),$E$5:E$5) returns the last populated cell in row 5 from column E on-wards

To see if that day is a weekend we can look at the 1st character LEFT(...,1) and see if it is a "S".

But thinking about it, it would probably be more efficient to replace the LOOKUP() part with this. LOOKUP(REPT("Z",255),$E5:E5)

If you do a search on the internet for lookup(rept("z",255 you'll get lots of hits explaining what is going on.
 
Upvote 0
Hi,

This part LOOKUP(2,1/($E$5:E$5<>""),$E$5:E$5) returns the last populated cell in row 5 from column E on-wards

To see if that day is a weekend we can look at the 1st character LEFT(...,1) and see if it is a "S".

But thinking about it, it would probably be more efficient to replace the LOOKUP() part with this. LOOKUP(REPT("Z",255),$E5:E5)

If you do a search on the internet for lookup(rept("z",255 you'll get lots of hits explaining what is going on.
Seems you are a Gem Of a Person.
Thanks for all kind help & enlightening me in improving my understanding on the Subject.
Billion Kudos !
 
Upvote 0
Great Help Form R. Your formula worked for me. Great Work & Expertise. Also, for my understanding would request please can you please unfold the formula bit by bit for my deep understanding.
Once again your solution is Marvelous. Great Regards

In the existing formula as suggested by you , if only 2nd & 4th Saturdays of every month to be conditionally formatted to "RED" with rest of the things as it is. How to modify, please help ! Thanks.
 
Upvote 0
In the existing formula as suggested by you , if only 2nd & 4th Saturdays of every month to be conditionally formatted to "RED" with rest of the things as it is. How to modify, please help ! Thanks.

Can you post some sample data that demonstrates the problem?
 
Upvote 0
Hi - you could try this lengthy formula with your CF.

Excel Formula:
=AND(LEFT(LOOKUP(REPT("z",255),$E$5:E$5,$E$5:E$5),1)="S",ISEVEN(SUMPRODUCT(0+(TEXT($E$6:E$6,"YYYYMM")=TEXT(LOOKUP(9E+99+307,$E$6:E$6,$E$6:E$6),"YYYYMM")),0+($E$5:E$5=LOOKUP(REPT("z",255),$E$5:E$5,$E$5:E$5)))))
 
Upvote 0

Forum statistics

Threads
1,215,731
Messages
6,126,539
Members
449,316
Latest member
sravya

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