george4884
New Member
- Joined
- Mar 16, 2014
- Messages
- 6
Hi All,
I'm struggling with this situation described below:
If the day/time on Column B and Column C falls outside the criteria shown below, then I need to insert a row before the next non blank cell, and insert the word "QUERY" in Column D.
Criteria:
Monday - Friday, 08:00 until 17:00
Saturday, 08:00 until 13:00
Sunday, 08:00 until 11:00
I have made a dummy data below to illustrate how my spreadsheet looks like. My original spreadsheet >5000 rows of data.
Original data before modification:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Column C[/TD]
[TD]Column D[/TD]
[/TR]
[TR]
[TD]11000345[/TD]
[TD]8/3/2014[/TD]
[TD]07:30[/TD]
[TD]WGFH2[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]IJLKS[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]KJB4HL
[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]KJBKLB[/TD]
[/TR]
[TR]
[TD]11000346[/TD]
[TD]8/3/2014[/TD]
[TD]08:50[/TD]
[TD]FEHWJ[/TD]
[/TR]
[TR]
[TD]11000347[/TD]
[TD]9/3/2014[/TD]
[TD]11:24[/TD]
[TD]GHJHO[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]KSBJLK[/TD]
[/TR]
[TR]
[TD]11000348[/TD]
[TD]9/3/2014[/TD]
[TD]18:13[/TD]
[TD]DFHYK[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]KJLBK5
[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]KLJBLK[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]KKLJ90[/TD]
[/TR]
[TR]
[TD]11000349[/TD]
[TD]9/3/2014[/TD]
[TD]19:30[/TD]
[TD]KJBFJ[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]SGEBE[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]DGGT[/TD]
[/TR]
[TR]
[TD]11000350[/TD]
[TD]10/3/2014[/TD]
[TD]06:45[/TD]
[TD]KLNKJ[/TD]
[/TR]
[TR]
[TD]11000351[/TD]
[TD]10/3/2014[/TD]
[TD]07:38[/TD]
[TD]JHSBN[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]RHTYH[/TD]
[/TR]
[TR]
[TD]11000352[/TD]
[TD]10/3/2014[/TD]
[TD]08:15[/TD]
[TD]KJSN9[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]HRH53[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]DTHT4[/TD]
[/TR]
[TR]
[TD]11000353[/TD]
[TD]10/3/2014[/TD]
[TD]17:31[/TD]
[TD]JGLIO[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]SGEBE[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]DFHYK[/TD]
[/TR]
</tbody>[/TABLE]
This is how I want it to be modified:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Column C[/TD]
[TD]Column D[/TD]
[/TR]
[TR]
[TD]11000345[/TD]
[TD]8/3/2014[/TD]
[TD]07:30[/TD]
[TD]WGFH2[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]IJLKS[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]KJB4HL
[/TD]
[/TR]
[TR]
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D]07:38[/TD]
[TD]JHSBN[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]RHTYH[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]QUERY[/TD]
[/TR]
[TR]
[TD]11000352[/TD]
[TD]10/3/2014[/TD]
[TD]08:15[/TD]
[TD]KJSN9[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]HRH53[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]DTHT4[/TD]
[/TR]
[TR]
[TD]11000353[/TD]
[TD]10/3/2014[/TD]
[TD]17:31[/TD]
[TD]JGLIO[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]SGEBE[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]DFHYK
[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]QUERY[/TD]
[/TR]
</tbody>[/TABLE]
Hope someone could help me on this...
File format: Ms Excel 97-2003 (*.xls), Windows 7/8
Thanks!
I'm struggling with this situation described below:
If the day/time on Column B and Column C falls outside the criteria shown below, then I need to insert a row before the next non blank cell, and insert the word "QUERY" in Column D.
Criteria:
Monday - Friday, 08:00 until 17:00
Saturday, 08:00 until 13:00
Sunday, 08:00 until 11:00
I have made a dummy data below to illustrate how my spreadsheet looks like. My original spreadsheet >5000 rows of data.
Original data before modification:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Column C[/TD]
[TD]Column D[/TD]
[/TR]
[TR]
[TD]11000345[/TD]
[TD]8/3/2014[/TD]
[TD]07:30[/TD]
[TD]WGFH2[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]IJLKS[/TD]
[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R]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]HRH53[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]DTHT4[/TD]
[/TR]
[TR]
[TD]11000353[/TD]
[TD]10/3/2014[/TD]
[TD]17:31[/TD]
[TD]JGLIO[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]SGEBE[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]DFHYK[/TD]
[/TR]
</tbody>[/TABLE]
This is how I want it to be modified:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Column C[/TD]
[TD]Column D[/TD]
[/TR]
[TR]
[TD]11000345[/TD]
[TD]8/3/2014[/TD]
[TD]07:30[/TD]
[TD]WGFH2[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]IJLKS[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]KJB4HL
[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]KJBKLB[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]QUERY[/TD]
[/TR]
[TR]
[TD]11000346[/TD]
[TD]8/3/2014[/TD]
[TD]08:50[/TD]
[TD]FEHWJ[/TD]
[/TR]
[TR]
[TD]11000347[/TD]
[TD]9/3/2014[/TD]
[TD]10:24[/TD]
[TD]GHJHO[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]KSBJLK[/TD]
[/TR]
[TR]
[TD]11000348[/TD]
[TD]9/3/2014[/TD]
[TD]18:13[/TD]
[TD]DFHYK[/TD]
[/TR]
[TR]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]KJLB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