Index+Match

kelvin_9

Active Member
Joined
Mar 6, 2015
Messages
460
Office Version
  1. 2019
hello all
i am wondering can i use index+match to return column L into my table O2:V11?

thank you very much for your guidence

Sample.xlsx
ABCDEFJKLMNOPQRSTUV
1Worker TypeLOBLocationPerson No.NameDateStart TimeEnd Time
2Holiday07/28/20247:4517:15AName28-Jul29-Jul30-Jul31-Jul1-Aug2-Aug3-Aug
3Carol07/29/202413:4523:15BSunMonTueWedThuFriSat
4Catherine07/30/202422:458:15CHolidayA
5Ming07/31/202421:307:00C1CarolB
6Marcus08/01/20249:0015:45A1CatherineC
7Toru08/02/202416:3023:15B1MingC1
8Thetis08/03/20247:4517:15AMarcusA1
9Amen07/28/202413:4523:15BToruB1
10ThetisA
11AmenB
136
Cell Formulas
RangeFormula
L2:L9L2=IFERROR(INDEX({"A";"B";"C";"C1";"A1";"B1"}, MATCH(TEXT(J2, "h:mm")&"-"&TEXT(K2, "h:mm"),{"7:45-17:15";"13:45-23:15";"22:45-8:15";"21:30-7:00";"9:00-15:45";"16:30-23:15"},0)), "not defined")
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
try
=IFERROR(INDEX($L$2:$L$9,MATCH(P$2&$O4,$F$2:$F$9&$E$2:$E$9,0)),"")

Book1
ABCDEFGHIJKLMNOPQRSTUV
1Worker TypeLOBLocationPerson No.NameDateStart TimeEnd Time
2Holiday7/28/240.322916670.71875AName7/28/247/29/247/30/247/31/248/1/248/2/248/3/24
3Carol7/29/240.572916670.96875BSunMonTueWedThuFriSat
4Catherine7/30/240.947916670.34375CHolidayA      
5Ming7/31/240.895833330.29166667C1Carol B     
6Marcus8/1/240.3750.65625A1Catherine  C    
7Toru8/2/240.68750.96875B1Ming   C1   
8Thetis8/3/240.322916670.71875AMarcus    A1  
9Amen7/28/240.572916670.96875BToru     B1 
10Thetis      A
11AmenB      
Sheet1
Cell Formulas
RangeFormula
P4:V11P4=IFERROR(INDEX($L$2:$L$9,MATCH(P$2&$O4,$F$2:$F$9&$E$2:$E$9,0)),"")
L2:L9L2=IFERROR(INDEX({"A";"B";"C";"C1";"A1";"B1"}, MATCH(TEXT(J2, "h:mm")&"-"&TEXT(K2, "h:mm"),{"7:45-17:15";"13:45-23:15";"22:45-8:15";"21:30-7:00";"9:00-15:45";"16:30-23:15"},0)), "not defined")
 
Upvote 0
thank you for your reply, etaf & Eric W

both are excellent, made my day 🤝 :cool::p

thank you very much
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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