VLOOKUP with match function or INDEX

saraapple

Board Regular
Joined
Feb 3, 2020
Messages
165
Office Version
  1. 2010
Platform
  1. Windows
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?

time.xlsx
ABCDEFGH
1DateNo.StoreDepotPermanent windowRevised window
220/09/20221AAATTT09:4011:4000
320/09/20222BBBTTT12:4014:4000
420/09/20223CCCMMM06:4008:4000
521/09/20224DDDTTT06:4008:4000
621/09/20225EEEMMM09:4011:4000
721/09/20226FFFTTT10:4012:4000
821/09/20221AAATTT09:4011:4000
921/09/20222BBBTTT12:4014:4000
1021/09/20223CCCMMM06:4008:4000
1121/09/20224DDDTTT06:4008:4000
Sheet1
Cell Formulas
RangeFormula
B2:D11B2=IF('Paste here'!B2="",(""),('Paste here'!B2))
E2:E11E2=IFERROR(VLOOKUP(B2,'Paste here'!B:V,21,FALSE),"")
F2:F11F2=IFERROR(VLOOKUP(B2,'Paste here'!B:W,22,FALSE),"")
G2:G11G2=VLOOKUP(B2,'Paste here'!B:X,23,FALSE)
H2:H11H2=VLOOKUP(B2,'Paste here'!B:Y,24,FALSE)


time.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXY
1DateNo.StoreDepotPermanent windowRevised windowReason CodeCommentFull Reason for ChangeNo delivery plannedSplit deliveryTime ChangeSplit and time changeFormatted as time STARTFormatted as time ENDRevised Formatted as time STARTRevised Formatted as time ENDAct StartAct EndRev StartRev End
220/09/20221AAATTT101210 10:0012:0000:0000:009:40 AM11:40 AM
320/09/20222BBBTTT131513 13:0015:0000:0000:0012:40 PM2:40 PM
420/09/20223CCCMMM797 07:0009:0000:0000:006:40 AM8:40 AM
520/09/20224DDDTTT797 07:0009:0000:0000:006:40 AM8:40 AM
620/09/20225EEEMMM101210 10:0012:0000:0000:009:40 AM11:40 AM
720/09/20226FFFTTT111311 Yes11:0013:0000:0000:0010:40 AM12:40 PM
821/09/20221AAATTT101214:0016:0000:0000:009:40 AM11:40 AM
921/09/20222BBBTTT131510:0012:0000:0000:0012:40 PM2:40 PM
1021/09/20223CCCMMM7907:0009:0000:0000:006:40 AM8:40 AM
1121/09/20224DDDTTT7907:0009:0000:0000:006:40 AM8: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.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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.

Hi, which column you are looking up?
Because 09:40 is in column V and 14:00 is in column R ..????
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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