If Hlookup is met, then enter "X"

fpskidmark

Board Regular
Joined
Sep 11, 2009
Messages
139
Excel Guru,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I need a code that will lookup a date from one sheet (sheet - "2011 Vaca") and checks it against another sheet (sheet - "2011"). If the date matches, place an "X" where the date and employee names meet.<o:p></o:p>
For example: <o:p></o:p>
If Janet Baldonado is off on "6/10/2011", I want the code to read that date and on the "2011" sheet and enter an "X" on the row for Janet Baldonado and the column with date - "6/10/2011".<o:p></o:p>
<o:p></o:p>
Any suggestion would be greatly appreciated.<o:p></o:p>
<o:p></o:p>
Thank you,<o:p></o:p>
FP<o:p></o:p>

Sheets ("2011 Vaca")
<TABLE style="WIDTH: 130pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=173 border=0 x:str><COLGROUP><COL style="WIDTH: 24pt; mso-width-source: userset; mso-width-alt: 1170" width=32><COL style="WIDTH: 25pt; mso-width-source: userset; mso-width-alt: 1206" width=33><COL style="WIDTH: 81pt; mso-width-source: userset; mso-width-alt: 3949" width=108><TBODY><TR style="HEIGHT: 22.5pt" height=30><TD class=xl24 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 24pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 22.5pt; BACKGROUND-COLOR: white" width=32 height=30>Days Off</TD><TD class=xl27 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 25pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: white" width=33>*</TD><TD class=xl29 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 81pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: white" width=108 x:str="Janet Baldonado ">Janet Baldonado </TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8 0.5pt; BORDER-LEFT: #ece9d8 0.5pt; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: white" align=right height=17 x:num x:fmla='=IF(C2="","",1)'>1</TD><TD class=xl28 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8 0.5pt; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white">Fri</TD><TD class=xl26 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8 0.5pt; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: #ffffcc" x:num="40704">6/10/2011</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8 0.5pt; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: white" align=right height=17 x:num x:fmla='=IF(C3="","",A2+1)'>2</TD><TD class=xl28 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white">Mon</TD><TD class=xl26 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: #ffffcc" x:num="40714">6/20/2011</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8 0.5pt; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: white" align=right height=17 x:num x:fmla='=IF(C4="","",A3+1)'>3</TD><TD class=xl28 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white">Tue</TD><TD class=xl26 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: #ffffcc" x:num="40715">6/21/2011</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8 0.5pt; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: white" align=right height=17 x:num x:fmla='=IF(C5="","",A4+1)'>4</TD><TD class=xl28 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white">Wed</TD><TD class=xl26 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: #ffffcc" x:num="40716">6/22/2011</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8 0.5pt; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: white" align=right height=17 x:num x:fmla='=IF(C6="","",A5+1)'>5</TD><TD class=xl28 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white">Thu</TD><TD class=xl26 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: #ffffcc" x:num="40717">6/23/2011</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8 0.5pt; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: white" align=right height=17 x:num x:fmla='=IF(C7="","",A6+1)'>6</TD><TD class=xl28 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white">Fri</TD><TD class=xl26 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: #ffffcc" x:num="40718">6/24/2011</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl25 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8 0.5pt; BORDER-BOTTOM: #ece9d8 0.5pt; HEIGHT: 12.75pt; BACKGROUND-COLOR: white" align=right height=17 x:num x:fmla='=IF(C8="","",A7+1)'>7</TD><TD class=xl28 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white">Mon</TD><TD class=xl26 style="BORDER-RIGHT: #ece9d8 0.5pt; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: #ffffcc" x:num="40721">6/27/2011</TD></TR></TBODY></TABLE>

Sheets("2011")
<TABLE style="WIDTH: 422pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=561 border=0 x:str><COLGROUP><COL style="WIDTH: 143pt; mso-width-source: userset; mso-width-alt: 6948" width=190><COL style="WIDTH: 16pt; mso-width-source: userset; mso-width-alt: 768" width=21><COL style="WIDTH: 40pt; mso-width-source: userset; mso-width-alt: 1938" width=53><COL style="WIDTH: 46pt; mso-width-source: userset; mso-width-alt: 2230" width=61><COL style="WIDTH: 34pt; mso-width-source: userset; mso-width-alt: 1645" width=45><COL style="WIDTH: 35pt; mso-width-source: userset; mso-width-alt: 1718" width=47><COL style="WIDTH: 33pt; mso-width-source: userset; mso-width-alt: 1609" span=2 width=44><COL style="WIDTH: 42pt; mso-width-source: userset; mso-width-alt: 2048" width=56><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl28 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 143pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: white" width=190 height=17>M--2</TD><TD class=xl37 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 16pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: white" width=21> </TD><TD class=xl24 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: windowtext; WIDTH: 40pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: #3366ff" width=53>Su-2</TD><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 46pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: navy" width=61>M-3</TD><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 34pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: navy" width=45>T-4</TD><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 35pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: navy" width=47>W-5</TD><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 33pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: navy" width=44>Th-6</TD><TD class=xl25 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 33pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: navy" width=44>F-7</TD><TD class=xl26 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 42pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: #3366ff" width=56>Sa-8</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl27 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: white" height=17> </TD><TD class=xl37 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: white"> </TD><TD class=xl69 style="BORDER-RIGHT: black 2pt double; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: #ffcc99" colSpan=7>Week 1</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl29 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696 0.5pt solid; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8; HEIGHT: 15pt; BACKGROUND-COLOR: black" height=20>Coordination Center</TD><TD class=xl45 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: black"> </TD><TD class=xl30 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #969696; BORDER-LEFT: windowtext; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: black"> </TD><TD class=xl31 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #969696; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: black"> </TD><TD class=xl31 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #969696; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: black"> </TD><TD class=xl31 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #969696; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: black"> </TD><TD class=xl31 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #969696; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: black"> </TD><TD class=xl31 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #969696; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: black"> </TD><TD class=xl32 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #969696; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: black"> </TD></TR><TR style="HEIGHT: 14.25pt" height=19><TD class=xl33 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: #ece9d8; HEIGHT: 14.25pt; BACKGROUND-COLOR: #ffffcc" height=19 x:str="Janet Baldonado ">Janet Baldonado </TD><TD class=xl72 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: #ccffcc" rowSpan=6>AM Shift</TD><TD class=xl67 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: windowtext 2pt double; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white; mso-pattern: #969696 thin-diag-stripe; mso-background-source: auto; mso-ignore: style" rowSpan=2>X</TD><TD class=xl49 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl49 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl49 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl49 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl49 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl66 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white; mso-pattern: #969696 thin-diag-stripe; mso-background-source: auto; mso-ignore: style" rowSpan=2>X</TD></TR><TR style="HEIGHT: 9.75pt; mso-height-source: userset" height=13><TD class=xl34 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: #969696 0.5pt solid; HEIGHT: 9.75pt; BACKGROUND-COLOR: #ffffcc" height=13>M-F 5:15AM - 1:45PM</TD></TR><TR style="HEIGHT: 14.25pt" height=19><TD class=xl35 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: #ece9d8; HEIGHT: 14.25pt; BACKGROUND-COLOR: #ffffcc" height=19 x:str="Vicki Marino ">Vicki Marino </TD><TD class=xl59 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696 0.5pt solid; BORDER-LEFT: windowtext 2pt double; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white; mso-pattern: #969696 thin-diag-stripe; mso-background-source: auto; mso-ignore: style" rowSpan=2>X</TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl56 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #969696 0.5pt solid; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white; mso-pattern: #969696 thin-diag-stripe; mso-background-source: auto; mso-ignore: style" rowSpan=2>X</TD></TR><TR style="HEIGHT: 9.75pt; mso-height-source: userset" height=13><TD class=xl34 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: #969696 0.5pt solid; HEIGHT: 9.75pt; BACKGROUND-COLOR: #ffffcc" height=13>M-F 8:30AM - 5:00PM</TD></TR><TR style="HEIGHT: 14.25pt" height=19><TD class=xl35 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: #ece9d8; HEIGHT: 14.25pt; BACKGROUND-COLOR: #ffffcc" height=19 x:str="Magdalena Ortega ">Magdalena Ortega </TD><TD class=xl59 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696 0.5pt solid; BORDER-LEFT: windowtext 2pt double; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white; mso-pattern: #969696 thin-diag-stripe; mso-background-source: auto; mso-ignore: style" rowSpan=2>X</TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=2> </TD><TD class=xl56 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #969696 0.5pt solid; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8 0.5pt; BACKGROUND-COLOR: white; mso-pattern: #969696 thin-diag-stripe; mso-background-source: auto; mso-ignore: style" rowSpan=2>X</TD></TR><TR style="HEIGHT: 9.75pt; mso-height-source: userset" height=13><TD class=xl34 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: #969696 0.5pt solid; HEIGHT: 9.75pt; BACKGROUND-COLOR: #ffffcc" height=13>M-F 9:00AM - 5:30PM</TD></TR><TR style="HEIGHT: 13.5pt; mso-height-source: userset" height=18><TD class=xl36 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: #969696 0.5pt solid; HEIGHT: 13.5pt; BACKGROUND-COLOR: black" height=18>Emergency Dept</TD><TD class=xl46 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: black"> </TD><TD class=xl63 style="BORDER-RIGHT: black 2pt double; BORDER-TOP: #969696 0.5pt solid; BORDER-LEFT: windowtext 2pt double; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: black" colSpan=7> </TD></TR><TR style="HEIGHT: 14.25pt" height=19><TD class=xl38 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #969696; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: #ece9d8; HEIGHT: 14.25pt; BACKGROUND-COLOR: #ffffcc" height=19 x:str="Clarizza Ortega ">Clarizza Ortega </TD><TD class=xl52 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: #ccffcc" rowSpan=11>AM Shift</TD><TD class=xl59 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696 0.5pt solid; BORDER-LEFT: windowtext 2pt double; BORDER-BOTTOM: #ece9d8 1pt; BACKGROUND-COLOR: white; mso-pattern: #969696 thin-diag-stripe; mso-background-source: auto; mso-ignore: style" rowSpan=3>X</TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: black 1pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: black 1pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: black 1pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: black 1pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: black 1pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl56 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #969696 0.5pt solid; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8 1pt; BACKGROUND-COLOR: white; mso-pattern: #969696 thin-diag-stripe; mso-background-source: auto; mso-ignore: style" rowSpan=3>X</TD></TR><TR style="HEIGHT: 9.75pt; mso-height-source: userset" height=13><TD class=xl39 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: #ece9d8; HEIGHT: 9.75pt; BACKGROUND-COLOR: #ffffcc" height=13>M-F 5:15AM - 10:AM</TD></TR><TR style="HEIGHT: 9.75pt; mso-height-source: userset" height=13><TD class=xl40 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 9.75pt; BACKGROUND-COLOR: #ffffcc" height=13>M-F 11AM - 1:45PM</TD></TR><TR style="HEIGHT: 14.25pt" height=19><TD class=xl41 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8; HEIGHT: 14.25pt; BACKGROUND-COLOR: #ffffcc" height=19 x:str="Margaret Monreal ">Margaret Monreal </TD><TD class=xl54 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: windowtext 2pt double; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl50 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl50 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl50 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl50 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl50 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl57 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD></TR><TR style="HEIGHT: 9.75pt; mso-height-source: userset" height=13><TD class=xl42 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8; HEIGHT: 9.75pt; BACKGROUND-COLOR: #ffffcc" height=13>M-F 7AM - 3:30PM</TD></TR><TR style="HEIGHT: 9.75pt; mso-height-source: userset" height=13><TD class=xl43 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; HEIGHT: 9.75pt; BACKGROUND-COLOR: #ffffcc" height=13>S & Sa 7AM - 3:30PM -R</TD></TR><TR style="HEIGHT: 14.25pt" height=19><TD class=xl44 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8; HEIGHT: 14.25pt; BACKGROUND-COLOR: #ffffcc" height=19>Yessenia Vasquez - PT</TD><TD class=xl59 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: windowtext 2pt double; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl56 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD></TR><TR style="HEIGHT: 9.75pt; mso-height-source: userset" height=13><TD class=xl42 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8; HEIGHT: 9.75pt; BACKGROUND-COLOR: #ffffcc" height=13>M-W 7:00AM - 11:00AM</TD></TR><TR style="HEIGHT: 9.75pt; mso-height-source: userset" height=13><TD class=xl43 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; HEIGHT: 9.75pt; BACKGROUND-COLOR: #ffffcc" height=13>S & Sa 7AM - 3:30PM -R</TD></TR><TR style="HEIGHT: 14.25pt" height=19><TD class=xl44 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8; HEIGHT: 14.25pt; BACKGROUND-COLOR: #ffffcc" height=19>Lynda Gonzalez - PT</TD><TD class=xl59 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: windowtext 2pt double; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl61 style="BORDER-RIGHT: #969696 0.5pt solid; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD><TD class=xl56 style="BORDER-RIGHT: windowtext 2pt double; BORDER-TOP: #969696; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; BACKGROUND-COLOR: white" rowSpan=3> </TD></TR><TR style="HEIGHT: 9.75pt; mso-height-source: userset" height=13><TD class=xl42 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #ece9d8; HEIGHT: 9.75pt; BACKGROUND-COLOR: #ffffcc" height=13>TH-F 7:00AM - 11:00AM</TD></TR><TR style="HEIGHT: 9.75pt; mso-height-source: userset" height=13><TD class=xl43 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #969696 0.5pt solid; BORDER-BOTTOM: #969696 0.5pt solid; HEIGHT: 9.75pt; BACKGROUND-COLOR: #ffffcc" height=13>S & Sa 11PM - 7:30AM - R</TD><TD class=xl47 style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: fuchsia"> </TD></TR></TBODY></TABLE>

The Code below is way off:

PHP:
lastrow = Range("c500").End(xlUp).Row
For v = 4 To lastrow
  If Cells(v, "c") < 40726 And Range("B17").FormulaR1C1 = _
  "=HLOOKUP('2011 Vaca'!R[-13]C[1],'2011'!R[-14]C[1]:R[62]C[182],1)" _
  Then Sheets("2011").Cells(v, "F").FormulaR1C1 = "x"
Next v
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi Excel Guru,

I modified the code to read:
PHP:
Sheets("2011 Vaca").Select
Dim e As Long
On Error Resume Next
lastrow = Range("c80").End(xlUp).Row
For v = 4 To lastrow
e = Sheets("2011").Range("3:3").Find(Format(Sheets("2011 Vaca").Cells(v, "c"), "m/d/yyyy")).Column_
: Sheets("2011").Cells(7, e).FormulaR1C1 = "x"
Next v

The code looks good, but it's not working. I need another pair of eyes.
Can anyone please help?

Thanks,
FP
 
Upvote 0
I figured it out.....
PHP:
Sheets("Vacations").Activate
On Error Resume Next
lastrow = Range("aa80").End(xlUp).Row
For v7 = 4 To lastrow
t = Sheets("Vacations").Cells(v7, "aa").Value
If t <= 40726 Then e = Workbooks("RCO Schedule.xls").Sheets("2011").Range("c3:gb3").Find(t).Column: Workbooks("RCO Schedule.xls").Sheets("2011").Cells(23, e).FormulaR1C1 = "V"
e = Workbooks("RCO Schedule.xls").Sheets("2011").Range("c86:gb86").Find(t).Column: Workbooks("RCO Schedule.xls").Sheets("2011").Cells(106, e).FormulaR1C1 = "V"
Next v7

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,552
Messages
6,179,488
Members
452,917
Latest member
MrsMSalt

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