Help with Lookup

Dazzybeeguy

Board Regular
Joined
Jan 6, 2022
Messages
118
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hi - I want to add a formula in F5 that looks at the name in E5 and also the date in E2 and extract the data for the dates from F4:L4 so therefore F5:L5 would populate with

WFH(M)EDOESRWESSRDWFH(E)

I'm stumped so would appreciate some help.

Thanks


Book2
EFGHIJKLMNOPQRSTUVWXYZ
1Start Date
207/01/2025TueWedThuFriSatSunMon
307-01-25
4Person Drop Down07-Jan08-Jan09-Jan10-Jan11-Jan12-Jan13-Jan
5P 8
6P 13ESRWESSRDESESRW
7
8TeamsStaffGradeSun 05 JanMon 06 JanTue-07-JanWed-08-JanThu-09-JanFri-10-JanSat-11-JanSun-12-JanMon-13-JanTue-14-JanWed-15-JanThu-16-JanFri-17-JanSat-18-JanSun-19-JanMon-20-JanTue-21-JanWed-22-JanThu-23-Jan
9Team 1P 1AESEDOESRWESSRDESESEDOESRWESSRDESRWESSRDESES
10Team 2P 2ATOILWFH(E)WFH(M)EDOESRWESSRDWFH(E)WFH(M)WFH(L)SLWIWFH(M)EDOESRWESSRD
11Team 3P 3BALESTOILWFH(E)WFH(M)WFH(L)SLWIRWESSRDESESTOILWFH(E)WFH(M)WFH(L)SLWI
12Team 4P 4BESEDOESRWESSRDESESEDOESRWESSRDESRWESSRDESES
13Team 5P 5ATOILWFH(E)WFH(M)EDOESRWESSRDWFH(E)WFH(M)WFH(L)SLWIESRWESSRDESES
14Team 6P 6AALESTOILWFH(E)WFH(M)WFH(L)SLWIRWESSRDESESWFH(M)EDOESRWESSRD
15Team 7P 7BESEDOESRWESSRDXXESEDOESRWESSRDTOILWFH(E)WFH(M)WFH(L)SLWI
16Team 8P 8BTOILWFH(E)WFH(M)EDOESRWESSRDWFH(E)WFH(M)WFH(L)SLWIXXRWESSRDESES
17Team 9P 9AALESTOILWFH(E)WFH(M)WFH(L)SLWIRWESSRDESESWFH(M)ESRWESSRDES
18Team 10P 10AESEDOESRWESSRDESESEDOESRWESSRDTOILWFH(M)EDOESRWES
19Team 11P 11BTOILWFH(E)WFH(M)EDOESRWESSRDWFH(E)WFH(M)WFH(L)SLWIESTOILWFH(E)WFH(M)WFH(L)SL
20Team 12P 12BALESTOILWFH(E)WFH(M)WFH(L)SLWITOILXXESRWESWFH(M)ESRWESSRDES
21Team 13P 13AESEDOESRWESSRDESESRWESSRDESESESWFH(M)EDOESRWES
22Team 14P 14ATOILWFH(E)WFH(M)EDOESRWESSRDESESESESESESTOILWFH(E)WFH(M)WFH(L)SL
23Team 15P 15BALESTOILWFH(E)WFH(M)WFH(L)SLWIESESESESESESESRWESSRDES
24Team 16P 16BESESESESESESALESTOILWFH(E)WFH(M)WFH(L)SLWIWFH(M)EDOESRWES
Sheet1
Cell Formulas
RangeFormula
F2:L2F2=F4
E3E3=TEXT(E2,"dd-mm-yy")
F4F4=StartDate
G4:L4G4=F4+1
Named Ranges
NameRefers ToCells
StartDate=Sheet1!$E$2F4, E3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
O8,V8,AC8,AJ8Dates OccurringtodaytextNO
E5:E6Cell Valuecontains "vacancy"textNO
F2:L2Expression=WEEKDAY(F2,2)>5textNO
F4:L4Expression=WEEKDAY(F4,2)>5textNO
Cells with Data Validation
CellAllowCriteria
E5:E6List=$F$9:$F$24
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
In F5:
Excel Formula:
=INDEX($H$9:$Z$24,MATCH($E5,$F$9:$F$24,0),MATCH(F$4,$H$8:$Z$8,0))
and copy cell right
Will work both in Excel 2010 and 365
 
Upvote 0
PS. In Microsoft 365 delete F5:L5 and in f5 write (new possibilities with old functions):
Excel Formula:
=INDEX($H$9:$Z$24,MATCH($E5,$F$9:$F$24,0),MATCH(F$4:L$4,$H$8:$Z$8,0))
or using new functions
Excel Formula:
=CHOOSECOLS(FILTER($H$9:$Z$24,$E5=$F$9:$F$24,""),XMATCH(F$4:L$4,$H$8:$Z$8))

This formulas (use only one of them) will spill to cells on the right
 
Upvote 0
PS. In Microsoft 365 delete F5:L5 and in f5 write (new possibilities with old functions):
Excel Formula:
=INDEX($H$9:$Z$24,MATCH($E5,$F$9:$F$24,0),MATCH(F$4:L$4,$H$8:$Z$8,0))
or using new functions
Excel Formula:
=CHOOSECOLS(FILTER($H$9:$Z$24,$E5=$F$9:$F$24,""),XMATCH(F$4:L$4,$H$8:$Z$8))

This formulas (use only one of them) will spill to cells on the right

I am probably doing something wrong but cant get these to work.

Book2
EFGHIJKLMNOPQRSTUVWXYZ
1Start Date
207/01/2025TueWedThuFriSatSunMon
307-01-25
4Person Drop Down07-Jan08-Jan09-Jan10-Jan11-Jan12-Jan13-Jan
5P 7#N/A#N/A#N/A#N/A#N/A#N/A#N/A
6P 13#N/A
7
8TeamsStaffGradeSun 05 JanMon 06 JanTue-07-JanWed-08-JanThu-09-JanFri-10-JanSat-11-JanSun-12-JanMon-13-JanTue-14-JanWed-15-JanThu-16-JanFri-17-JanSat-18-JanSun-19-JanMon-20-JanTue-21-JanWed-22-JanThu-23-Jan
9Team 1P 1AESEDOESRWESSRDESESEDOESRWESSRDESRWESSRDESES
10Team 2P 2ATOILWFH(E)WFH(M)EDOESRWESSRDWFH(E)WFH(M)WFH(L)SLWIWFH(M)EDOESRWESSRD
11Team 3P 3BALESTOILWFH(E)WFH(M)WFH(L)SLWIRWESSRDESESTOILWFH(E)WFH(M)WFH(L)SLWI
12Team 4P 4BESEDOESRWESSRDESESEDOESRWESSRDESRWESSRDESES
13Team 5P 5ATOILWFH(E)WFH(M)EDOESRWESSRDWFH(E)WFH(M)WFH(L)SLWIESRWESSRDESES
14Team 6P 6AALESTOILWFH(E)WFH(M)WFH(L)SLWIRWESSRDESESWFH(M)EDOESRWESSRD
15Team 7P 7BESEDOESRWESSRDXXESEDOESRWESSRDTOILWFH(E)WFH(M)WFH(L)SLWI
16Team 8P 8BTOILWFH(E)WFH(M)EDOESRWESSRDWFH(E)WFH(M)WFH(L)SLWIXXRWESSRDESES
17Team 9P 9AALESTOILWFH(E)WFH(M)WFH(L)SLWIRWESSRDESESWFH(M)ESRWESSRDES
18Team 10P 10AESEDOESRWESSRDESESEDOESRWESSRDTOILWFH(M)EDOESRWES
19Team 11P 11BTOILWFH(E)WFH(M)EDOESRWESSRDWFH(E)WFH(M)WFH(L)SLWIESTOILWFH(E)WFH(M)WFH(L)SL
20Team 12P 12BALESTOILWFH(E)WFH(M)WFH(L)SLWITOILXXESRWESWFH(M)ESRWESSRDES
21Team 13P 13AESEDOESRWESSRDESESRWESSRDESESESWFH(M)EDOESRWES
22Team 14P 14ATOILWFH(E)WFH(M)EDOESRWESSRDESESESESESESTOILWFH(E)WFH(M)WFH(L)SL
23Team 15P 15BALESTOILWFH(E)WFH(M)WFH(L)SLWIESESESESESESESRWESSRDES
24Team 16P 16BESESESESESESALESTOILWFH(E)WFH(M)WFH(L)SLWIWFH(M)EDOESRWES
Sheet1
Cell Formulas
RangeFormula
F2:L2F2=F4
E3E3=TEXT(E2,"dd-mm-yy")
G4:L4G4=F4+1
F4F4=StartDate
F5:L5F5=INDEX(table,MATCH($E5,staff,0),MATCH(F$4:L$4,$H$8:$Z$8,0))
F6F6=CHOOSECOLS(FILTER($H$9:$Z$24,$E6=$F$9:$F$24,""),XMATCH(F$4:L$4,$H$8:$Z$8))
Dynamic array formulas.
Named Ranges
NameRefers ToCells
CoreData=Sheet1!$H$9:$AK$24F5:F6
DataTable=Sheet1!$H$8:$AK$24F5:F6
staff=Sheet1!$F$9:$F$24F5:F6
StartDate=Sheet1!$E$2F4, E3
table=Sheet1!$H$9:$Z$24F5:F6
Cells with Conditional Formatting
CellConditionCell FormatStop If True
O8,V8,AC8,AJ8Dates OccurringtodaytextNO
E5:E6Cell Valuecontains "vacancy"textNO
F2:L2Expression=WEEKDAY(F2,2)>5textNO
F4:L4Expression=WEEKDAY(F4,2)>5textNO
Cells with Data Validation
CellAllowCriteria
E5:E6List=$F$9:$F$24
 
Upvote 0
Hi! You have dates in cells H8:Z8 as text, that's why the formula doesn't work. Write dates in these cells as 01/05/2025, etc. And then set the custom format for them as "ddd dd mmm". As a result, the dates will be in the form of "Sun 05 Jan", and the formulas will calculate correctly.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
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