Hey All,
First time posting, as I am just staring at the screen trying to figure out a very complex formula string. If there are any wizards out there that are up for a challenge I would be forever grateful!
I'll start off with what I'm trying to do. I have data from an online form in an excel sheet. Part of that data is a schedule of student classes including: class name, day(s) of the week, start time, end time. I want to have excel look through that data and return a value that I can then apply a conditional format to, to shade the cell, creating a more graphical version of the data.
The raw data:
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 11pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl65 { font-weight: 700; text-align: center; vertical-align: middle; border: 0.5pt solid windowtext; background: none repeat scroll 0% 0% rgb(204, 255, 204); white-space: normal; }.xl66 { border: 0.5pt solid windowtext; }.xl67 { border: 0.5pt solid windowtext; }.xl68 { border: 0.5pt solid windowtext; }.xl69 { border: 0.5pt solid windowtext; }</style> [TABLE="width: 1007"]
<tbody>[TR]
[TD="class: xl65, width: 142"]Submission Date[/TD]
[TD="class: xl65, width: 78"]First Name[/TD]
[TD="class: xl65, width: 71"]Last Name[/TD]
[TD="class: xl65, width: 120"]Class[/TD]
[TD="class: xl65, width: 71"]Day(s)[/TD]
[TD="class: xl65, width: 78"]Start Time[/TD]
[TD="class: xl65, width: 78"]End Time[/TD]
[TD="class: xl65, width: 128"]Class 2[/TD]
[TD="class: xl65, width: 71"]Day(s) 2[/TD]
[TD="class: xl65, width: 92"]Start Time 2[/TD]
[TD="class: xl65, width: 78"]End Time 2[/TD]
[/TR]
[TR]
[TD="class: xl66"]2015-07-22 11:37:45[/TD]
[TD="class: xl67"]Adam[/TD]
[TD="class: xl67"]Test[/TD]
[TD="class: xl67"]Chemistry[/TD]
[TD="class: xl67"]Monday
Wednesday
Friday[/TD]
[TD="class: xl68, align: right"]8:00[/TD]
[TD="class: xl69, align: right"]9:20 AM[/TD]
[TD="class: xl67"]Math[/TD]
[TD="class: xl67"]Tuesday
Thursday[/TD]
[TD="class: xl69, align: right"]8:30 AM[/TD]
[TD="class: xl69, align: right"]10:00 AM[/TD]
[/TR]
</tbody>[/TABLE]
The Graphical Sheet:
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 11pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl65 { border: 0.5pt solid windowtext; }.xl66 { border: 0.5pt solid windowtext; }</style> [TABLE="width: 390"]
<tbody>[TR]
[TD="class: xl65, width: 65"]TIME[/TD]
[TD="class: xl65, width: 65"]MONDAY[/TD]
[TD="class: xl65, width: 65"]TUESDAY[/TD]
[TD="class: xl65, width: 65"]WEDNESDAY[/TD]
[TD="class: xl65, width: 65"]THURSDAY[/TD]
[TD="class: xl65, width: 65"]FRIDAY[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:00 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:15 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:30 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:45 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:00 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:15 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:30 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:45 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
</tbody>[/TABLE]
This is proving very tricky. My plan was to create a formula to sit in each cell of the graphical sheet. This would reference the data sheet. The formula needs to check the data to see first, if there is a match to the date (i.e. Monday), then if the start time is >= the time of the cell, and if the end time is <= the time of the cell. I've actually figured most of that part out with the below formula.
=IF(AND(ISNUMBER(SEARCH("Monday",$E$2)),IF(AND($F$2<=TIME(8,0,0),$G$2>=TIME(8,0,0)),TRUE,FALSE)),1,0)
I have to manually change the time numbers for each cell, but I can live with that.
PROBLEM #1: The one issue with this is, it is only looking in specific cells that I've defined, and therefore only looking for one class. I need it to look at all the classes, however the data that it's looking for is not in contiguous columns...
If I can figure out how to fix this problem, then I could at least shade the cells where classes are present in the graphical sheet.
PROBLEM #2: The ideal formula would not only look at all the data and calculate if the conditions are met, but would then display the class that met the defined criteria.
I'll finish up by providing what the graphical table would look like if I could figure out the correct formula.
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 11pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl65 { border: 0.5pt solid windowtext; }.xl66 { border: 0.5pt solid windowtext; }</style> [TABLE="width: 390"]
<tbody>[TR]
[TD="class: xl65, width: 65"]TIME[/TD]
[TD="class: xl65, width: 65"]MONDAY[/TD]
[TD="class: xl65, width: 65"]TUESDAY[/TD]
[TD="class: xl65, width: 65"]WEDNESDAY[/TD]
[TD="class: xl65, width: 65"]THURSDAY[/TD]
[TD="class: xl65, width: 65"]FRIDAY[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:00 AM[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Chemistry[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:15 AM[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Chemistry[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:30 AM[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:45 AM[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:00 AM[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:15 AM[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:30 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:45 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"][/TD]
[/TR]
</tbody>[/TABLE]
Any ideas would earn my undying gratitude and awe at your excel wizarding awesomeness!!
First time posting, as I am just staring at the screen trying to figure out a very complex formula string. If there are any wizards out there that are up for a challenge I would be forever grateful!
I'll start off with what I'm trying to do. I have data from an online form in an excel sheet. Part of that data is a schedule of student classes including: class name, day(s) of the week, start time, end time. I want to have excel look through that data and return a value that I can then apply a conditional format to, to shade the cell, creating a more graphical version of the data.
The raw data:
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 11pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl65 { font-weight: 700; text-align: center; vertical-align: middle; border: 0.5pt solid windowtext; background: none repeat scroll 0% 0% rgb(204, 255, 204); white-space: normal; }.xl66 { border: 0.5pt solid windowtext; }.xl67 { border: 0.5pt solid windowtext; }.xl68 { border: 0.5pt solid windowtext; }.xl69 { border: 0.5pt solid windowtext; }</style> [TABLE="width: 1007"]
<tbody>[TR]
[TD="class: xl65, width: 142"]Submission Date[/TD]
[TD="class: xl65, width: 78"]First Name[/TD]
[TD="class: xl65, width: 71"]Last Name[/TD]
[TD="class: xl65, width: 120"]Class[/TD]
[TD="class: xl65, width: 71"]Day(s)[/TD]
[TD="class: xl65, width: 78"]Start Time[/TD]
[TD="class: xl65, width: 78"]End Time[/TD]
[TD="class: xl65, width: 128"]Class 2[/TD]
[TD="class: xl65, width: 71"]Day(s) 2[/TD]
[TD="class: xl65, width: 92"]Start Time 2[/TD]
[TD="class: xl65, width: 78"]End Time 2[/TD]
[/TR]
[TR]
[TD="class: xl66"]2015-07-22 11:37:45[/TD]
[TD="class: xl67"]Adam[/TD]
[TD="class: xl67"]Test[/TD]
[TD="class: xl67"]Chemistry[/TD]
[TD="class: xl67"]Monday
Wednesday
Friday[/TD]
[TD="class: xl68, align: right"]8:00[/TD]
[TD="class: xl69, align: right"]9:20 AM[/TD]
[TD="class: xl67"]Math[/TD]
[TD="class: xl67"]Tuesday
Thursday[/TD]
[TD="class: xl69, align: right"]8:30 AM[/TD]
[TD="class: xl69, align: right"]10:00 AM[/TD]
[/TR]
</tbody>[/TABLE]
The Graphical Sheet:
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 11pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl65 { border: 0.5pt solid windowtext; }.xl66 { border: 0.5pt solid windowtext; }</style> [TABLE="width: 390"]
<tbody>[TR]
[TD="class: xl65, width: 65"]TIME[/TD]
[TD="class: xl65, width: 65"]MONDAY[/TD]
[TD="class: xl65, width: 65"]TUESDAY[/TD]
[TD="class: xl65, width: 65"]WEDNESDAY[/TD]
[TD="class: xl65, width: 65"]THURSDAY[/TD]
[TD="class: xl65, width: 65"]FRIDAY[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:00 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:15 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:30 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:45 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:00 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:15 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:30 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:45 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
</tbody>[/TABLE]
This is proving very tricky. My plan was to create a formula to sit in each cell of the graphical sheet. This would reference the data sheet. The formula needs to check the data to see first, if there is a match to the date (i.e. Monday), then if the start time is >= the time of the cell, and if the end time is <= the time of the cell. I've actually figured most of that part out with the below formula.
=IF(AND(ISNUMBER(SEARCH("Monday",$E$2)),IF(AND($F$2<=TIME(8,0,0),$G$2>=TIME(8,0,0)),TRUE,FALSE)),1,0)
I have to manually change the time numbers for each cell, but I can live with that.
PROBLEM #1: The one issue with this is, it is only looking in specific cells that I've defined, and therefore only looking for one class. I need it to look at all the classes, however the data that it's looking for is not in contiguous columns...
If I can figure out how to fix this problem, then I could at least shade the cells where classes are present in the graphical sheet.
PROBLEM #2: The ideal formula would not only look at all the data and calculate if the conditions are met, but would then display the class that met the defined criteria.
I'll finish up by providing what the graphical table would look like if I could figure out the correct formula.
<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 11pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri; vertical-align: bottom; border: medium none; white-space: nowrap; }.xl65 { border: 0.5pt solid windowtext; }.xl66 { border: 0.5pt solid windowtext; }</style> [TABLE="width: 390"]
<tbody>[TR]
[TD="class: xl65, width: 65"]TIME[/TD]
[TD="class: xl65, width: 65"]MONDAY[/TD]
[TD="class: xl65, width: 65"]TUESDAY[/TD]
[TD="class: xl65, width: 65"]WEDNESDAY[/TD]
[TD="class: xl65, width: 65"]THURSDAY[/TD]
[TD="class: xl65, width: 65"]FRIDAY[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:00 AM[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Chemistry[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:15 AM[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Chemistry[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:30 AM[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]8:45 AM[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:00 AM[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:15 AM[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"]Chemistry[/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:30 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66, align: right"]9:45 AM[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]Math[/TD]
[TD="class: xl65"][/TD]
[/TR]
</tbody>[/TABLE]
Any ideas would earn my undying gratitude and awe at your excel wizarding awesomeness!!