I have created a spreadsheet with a simple VLOOKUP but have just realized that the data it returns will not be accurate as the existing data is build on each day!
So on day one Store AAA may open at 09:40 but on day two it opens at 14:00 - my vlook up obviously returns the day one value as this is the first one it comes to.
My question is how do I get it to look at the date also?
As you can see the date in is column A in both sheets so I know this is possible but I have been experimenting with MATCH and INDEX and just getting nowhere.
Any help would be greatly appreciated.
So on day one Store AAA may open at 09:40 but on day two it opens at 14:00 - my vlook up obviously returns the day one value as this is the first one it comes to.
My question is how do I get it to look at the date also?
time.xlsx | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | Date | No. | Store | Depot | Permanent window | Revised window | ||||
2 | 20/09/2022 | 1 | AAA | TTT | 09:40 | 11:40 | 0 | 0 | ||
3 | 20/09/2022 | 2 | BBB | TTT | 12:40 | 14:40 | 0 | 0 | ||
4 | 20/09/2022 | 3 | CCC | MMM | 06:40 | 08:40 | 0 | 0 | ||
5 | 21/09/2022 | 4 | DDD | TTT | 06:40 | 08:40 | 0 | 0 | ||
6 | 21/09/2022 | 5 | EEE | MMM | 09:40 | 11:40 | 0 | 0 | ||
7 | 21/09/2022 | 6 | FFF | TTT | 10:40 | 12:40 | 0 | 0 | ||
8 | 21/09/2022 | 1 | AAA | TTT | 09:40 | 11:40 | 0 | 0 | ||
9 | 21/09/2022 | 2 | BBB | TTT | 12:40 | 14:40 | 0 | 0 | ||
10 | 21/09/2022 | 3 | CCC | MMM | 06:40 | 08:40 | 0 | 0 | ||
11 | 21/09/2022 | 4 | DDD | TTT | 06:40 | 08:40 | 0 | 0 | ||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B2:D11 | B2 | =IF('Paste here'!B2="",(""),('Paste here'!B2)) |
E2:E11 | E2 | =IFERROR(VLOOKUP(B2,'Paste here'!B:V,21,FALSE),"") |
F2:F11 | F2 | =IFERROR(VLOOKUP(B2,'Paste here'!B:W,22,FALSE),"") |
G2:G11 | G2 | =VLOOKUP(B2,'Paste here'!B:X,23,FALSE) |
H2:H11 | H2 | =VLOOKUP(B2,'Paste here'!B:Y,24,FALSE) |
time.xlsx | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | |||
1 | Date | No. | Store | Depot | Permanent window | Revised window | Reason Code | Comment | Full Reason for Change | No delivery planned | Split delivery | Time Change | Split and time change | Formatted as time START | Formatted as time END | Revised Formatted as time START | Revised Formatted as time END | Act Start | Act End | Rev Start | Rev End | ||||||
2 | 20/09/2022 | 1 | AAA | TTT | 10 | 12 | 10 | 10:00 | 12:00 | 00:00 | 00:00 | 9:40 AM | 11:40 AM | ||||||||||||||
3 | 20/09/2022 | 2 | BBB | TTT | 13 | 15 | 13 | 13:00 | 15:00 | 00:00 | 00:00 | 12:40 PM | 2:40 PM | ||||||||||||||
4 | 20/09/2022 | 3 | CCC | MMM | 7 | 9 | 7 | 07:00 | 09:00 | 00:00 | 00:00 | 6:40 AM | 8:40 AM | ||||||||||||||
5 | 20/09/2022 | 4 | DDD | TTT | 7 | 9 | 7 | 07:00 | 09:00 | 00:00 | 00:00 | 6:40 AM | 8:40 AM | ||||||||||||||
6 | 20/09/2022 | 5 | EEE | MMM | 10 | 12 | 10 | 10:00 | 12:00 | 00:00 | 00:00 | 9:40 AM | 11:40 AM | ||||||||||||||
7 | 20/09/2022 | 6 | FFF | TTT | 11 | 13 | 11 | Yes | 11:00 | 13:00 | 00:00 | 00:00 | 10:40 AM | 12:40 PM | |||||||||||||
8 | 21/09/2022 | 1 | AAA | TTT | 10 | 12 | 14:00 | 16:00 | 00:00 | 00:00 | 9:40 AM | 11:40 AM | |||||||||||||||
9 | 21/09/2022 | 2 | BBB | TTT | 13 | 15 | 10:00 | 12:00 | 00:00 | 00:00 | 12:40 PM | 2:40 PM | |||||||||||||||
10 | 21/09/2022 | 3 | CCC | MMM | 7 | 9 | 07:00 | 09:00 | 00:00 | 00:00 | 6:40 AM | 8:40 AM | |||||||||||||||
11 | 21/09/2022 | 4 | DDD | TTT | 7 | 9 | 07:00 | 09:00 | 00:00 | 00:00 | 6:40 AM | 8:40 AM | |||||||||||||||
Paste here |
As you can see the date in is column A in both sheets so I know this is possible but I have been experimenting with MATCH and INDEX and just getting nowhere.
Any help would be greatly appreciated.