Conditional Formulas for a range of cells

nirmalar

New Member
Joined
Nov 1, 2010
Messages
8
Hello,

I have Names in Cell 1, and time frames from 9 AM to 5 PM in each cell ranging from B - J.

When I type leave in any cell adjacent to a name, the entire cells B - J for that person should be filled by the defined color.

I tried conditional formatting, it lets me do it only for one cell at a time. I do not want to merge all the cells, also I would enter leave any one of those cells.

Names 9AM 10AM 11 AM ... 5PM
Angel leave
Barbie
Cathy leave

I am not comfortable with macros, as I also need to put this on google doc.

Thanks.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
TRY THIS

Excel Workbook
ABCDE
1Names9AM10AM11AM12AM
2Angel leaveLeave
3Barbie*
4Cathy leaveleave
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B21. / Formula is =UPPER($B2)="LEAVE"Abc
 
Upvote 0
<table border="1" cellspacing="0" cellpadding="0" style="font-family:Arial,Arial; font-size:10pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="width:30px; " /><col style="width:72.67px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /><col style="width:64px;" /></colgroup><tr style="background-color:#cacaca; text-align:center;font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td><td >E</td><td >F</td><td >G</td><td >H</td><td >I</td><td >J</td></tr><tr style="height:25px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td >Names</td><td style="text-align:right; ">9:00 AM</td><td style="text-align:right; ">10:00 AM</td><td style="text-align:right; ">11:00 AM</td><td style="text-align:right; ">12:00 PM</td><td style="text-align:right; ">1:00 PM</td><td style="text-align:right; ">2:00 PM</td><td style="text-align:right; ">3:00 PM</td><td style="text-align:right; ">4:00 PM</td><td style="text-align:right; ">5:00 PM</td></tr><tr style="height:25px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td >Angel</td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; ">Leave</td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; "> </td></tr><tr style="height:25px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td >Barbie</td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td><td > </td></tr><tr style="height:25px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td >Cathy</td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; ">leave</td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; "> </td><td style="background-color:#ffcc99; "> </td></tr></table><br /><table style="font-family:Arial; font-size:10pt; background-color:#fffcf9; border-style: groove ;border-color:#ff0000"><tr><td ><b>Conditional formatting </b></td></tr><tr><td ><table border="1" cellspacing="0" cellpadding="0" style="font-family:Arial; font-size:10pt; padding-left:2pt; padding-right:2pt; "><tr><td >Cell</td><td >Nr.: / Condition</td><td >Format</td></tr><tr><td >B2</td><td >1. / Formula is =ISNUMBER(MATCH("Leave",$B2:$J2,0))</td><td style="background-color:#ffcc99; ">Abc</td></tr></table></td></tr></table>

This could work as well.
=COUNTIF($B2:$J2,"Leave")>0
 
Last edited:
Upvote 0

Forum statistics

Threads
1,202,983
Messages
6,052,905
Members
444,611
Latest member
ggwpnore

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