Lookup list of name in one colum then go along the row of that name for a value and display the date in the "header" multiple matches

ashk0812

New Member
Joined
Sep 27, 2019
Messages
11
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Good morning I wonder if anyone can point me in the right direction I have a holiday tracker that I wish to create a lookup sheet so i enter a name and get the dates returned that they have booked.

The sheet contains a list of names in one column so i would want to match that then go along the row of that name for a few defined values (Holiday, ServiceDay) and display the date that is contained in row 7

I have included a sample sheet if this helps in my explination any better

Test Holiday Tracker.xlsx
BCDNPQRSTUVWXYZAAABAC
22021 Holiday TrackerLeftTOTAL PER DAY:01100  00110
3#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!
4Total Days Remaining: 242
5
6SatSunMonTueWedThuFriSatSunMonTueWedThuFri
7AreaRoleName02/0103/0104/0105/0106/0107/0108/0109/0110/0111/0112/0113/0114/0115/01
8G2SSupervisorName 13
9G2STeamleaderName 25
10G2SAssociate 01Name 36
11G2SAssociate 02Name 46AA
12G2SAssociate 03Name 57AA
13G2SAssociate 04Name 69
14G2SAssociate 05Name 710
15G2SAssociate 06Name 811
16G2SAssociate 07Name 911FH
17G2SAssociate 08Name 1013
18G2SAssociate 09Name 1114
19G2SAssociate 10Name 1214SERVICE
20G2SAssociate 11Name 1316DENIED
21G2SAssociate 12Name 1417
22G2SAssociate 13Name 1518
23G2SAssociate 14Name 1619
24G2SAssociate 15Name 1720
25G2SAssociate 16Name 1821
26G2SAssociate 17Name 1922
27 
28 
Holidays
Cell Formulas
RangeFormula
B2B2=Setup!$D$11&" Holiday Tracker"
R2:AC2R2=IF(R4="SH","",IF(R4="BH","", IF(WEEKDAY(R6)=1,"", IF(WEEKDAY(R6)=7,"",COUNTIF(R8:R28,Setup!$D$27)+COUNTIF(R8:R28,Setup!$D$28)+COUNTIF(R8:R28,Setup!$D$29)+COUNTIF(R8:R28,Setup!$D$30)+COUNTIF(R8:R28,Setup!$D$31)+COUNTIF(R8:R28,Setup!$D$32)+COUNTIF(R8:R28,Setup!$D$33)+COUNTIF(R8:R28,Setup!$D$34)+COUNTIF(R8:R28,Setup!$D$35)+COUNTIF(R8:R28,Setup!$D$36)+COUNTIF(R8:R28,Setup!$D$37)))))
P3:AA3P3=IF(P4="", IF(P7>=$I$3, IF(WEEKDAY(P6)=1, IF(Q3="SH",O5,""), IF(WEEKDAY(P6)=2,R5, IF(WEEKDAY(P6)=3,Q5, IF(WEEKDAY(P6)=4,P5, IF(WEEKDAY(P6)=5,O5, IF(WEEKDAY(P6)=6,N5, IF(WEEKDAY(P6)=7,""))))))),P3),P4)
AB3AB3=IF(AB4="", IF(AB7>=$I$3, IF(WEEKDAY(AB6)=1, IF(AC3="SH",AA5,""), IF(WEEKDAY(AB6)=2,#REF!, IF(WEEKDAY(AB6)=3,AC5, IF(WEEKDAY(AB6)=4,AB5, IF(WEEKDAY(AB6)=5,AA5, IF(WEEKDAY(AB6)=6,Z5, IF(WEEKDAY(AB6)=7,""))))))),AB3),AB4)
AC3AC3=IF(AC4="", IF(AC7>=$I$3, IF(WEEKDAY(AC6)=1, IF(#REF!="SH",AB5,""), IF(WEEKDAY(AC6)=2,#REF!, IF(WEEKDAY(AC6)=3,#REF!, IF(WEEKDAY(AC6)=4,AC5, IF(WEEKDAY(AC6)=5,AB5, IF(WEEKDAY(AC6)=6,AA5, IF(WEEKDAY(AC6)=7,""))))))),AC3),AC4)
B4B4="Total Days Remaining: "&SUM(N:N)
P6:Q6P6=WEEKDAY(P7)
R6:AC6R6=R7
P7:AC7P7=O7+1
N8:N28N8=IFERROR(IF(D8="","",SUM(K8+M8+L8-COUNTIF(O8:AD8,Setup!$D$27)-COUNTIF(O8:AD8,Setup!$D$28)-COUNTIF(O8:AD8,Setup!$D$29)-COUNTIF(O8:AD8,Setup!$D$30)-COUNTIF(O8:AD8,Setup!$D$31)-COUNTIF(O8:AD8,Setup!$D$32)-COUNTIF(O8:AD8,Setup!$D$33)-COUNTIF(O8:AD8,Setup!$D$34)-COUNTIF(O8:AD8,Setup!$D$35)-COUNTIF(O8:AD8,Setup!$D$36)-COUNTIF(O8:AD8,Setup!$D$37))),(IF(D8="","",SUM(K8+M8-COUNTIF(O8:AD8,Setup!$D$27)-COUNTIF(O8:AD8,Setup!$D$28)-COUNTIF(O8:AD8,Setup!$D$29)-COUNTIF(O8:AD8,Setup!$D$30)-COUNTIF(O8:AD8,Setup!$D$31)-COUNTIF(O8:AD8,Setup!$D$32)-COUNTIF(O8:AD8,Setup!$D$33)-COUNTIF(O8:AD8,Setup!$D$34)-COUNTIF(O8:AD8,Setup!$D$35)-COUNTIF(O8:AD8,Setup!$D$36)-COUNTIF(O8:AD8,Setup!$D$37)))))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B8:AD28Expression=$N8<0textNO
O8:AD28Cell Valuecontains "DENIED"textNO
O8:AD28Cell Valuecontains "ALLOC"textNO
O8:AD28Celldoes not contain a blank value textNO
O6:AD28Expression=O$3="BH"textNO
O5:AD7Expression=O$3="Nights"textNO
O5:AD7Expression=O$3="Backs"textNO
O5:AD7Expression=O$3="Days"textNO
D:ECell ValueduplicatestextNO
O5:AD5Expression=O$3="BH"textNO
O6:AD28Expression=O$3="SD"textNO
O5:AD5Expression=O$3="SD"textNO
O5:AD5Expression=O$3="SH"textNO
O6:AD28Expression=O$3="SH"textNO
O6:AD28Expression=IF(WEEKDAY(O$7)=7,TRUE)textNO
O6:AD28Expression=IF(WEEKDAY(O$7)=1,TRUE)textNO
O5:AD5Expression=IF(WEEKDAY(O$7)=7,TRUE)textYES
O5:AD5Expression=IF(WEEKDAY(O$7)=1,TRUE)textYES
O5:AD28,O2:P2,R2:AD2Expression=(O$2+0>=Setup!$D$17)textYES
O8:AD28Expression=$N8=0textNO
N2,N50:N1048576,N8:N28Expression=$N2=0textNO
Cells with Data Validation
CellAllowCriteria
O4:AC4List=Setup!$F$30:$F$33
O8:AC28List=Setup!$D$27:$D$38
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

It would also help if you posted the results you expect from that sample data.

a few defined values (Holiday, ServiceDay)
Is it only those two values or more?
Looks like "SERVICE" might represent a "ServiceDay", but what identifies "Holiday"?
 
Upvote 0
Hi Peter I have updated my profile to indiate office 365
There are indeed more values, a holiday is denoted by a FH The results i am hoping for is somthing like below on a seperate tab I am thinking its going to be a combination of match and filter but i cant figure out how to combine them regards, Ash


Test Holiday Tracker.xlsx
ABCD
1
2
3NameName 4
4
5
6
7
8
9Dates Booked05-Jan
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Lookup Sheet
 
Upvote 0
Not quite sure how you got that sample result since Name 4 has "AA" on 5-Jan, not "FH" but try this in C9 of the Lookup Sheet

Excel Formula:
=TRANSPOSE(FILTER(Holidays!P7:AC7,INDEX(Holidays!P8:AC26,MATCH(C3,Holidays!D8:D26,0),0)="FH",""))
 
Upvote 0
How about
+Fluff 1.xlsm
BCDNOPQRSTUVWXYZAAABAC
22021 Holiday TrackerLeftTOTAL PER DAY:0110000110
3#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!#REF!
4Total Days Remaining: 242
5
6SatSunMonTueWedThuFriSatSunMonTueWedThuFri
7AreaRoleName02-Jan03-Jan04-Jan05-Jan06-Jan07-Jan08-Jan09-Jan10-Jan11-Jan12-Jan13-Jan14-Jan15-Jan
8G2SSupervisorName 13
9G2STeamleaderName 25
10G2SAssociate 01Name 36
11G2SAssociate 02Name 46FHSERVICE
12G2SAssociate 03Name 57AA
13G2SAssociate 04Name 69
14G2SAssociate 05Name 710
15G2SAssociate 06Name 811
16G2SAssociate 07Name 911FH
17G2SAssociate 08Name 1013
18G2SAssociate 09Name 1114
19G2SAssociate 10Name 1214SERVICE
20G2SAssociate 11Name 1316DENIED
21G2SAssociate 12Name 1417
22G2SAssociate 13Name 1518
23G2SAssociate 14Name 1619
24G2SAssociate 15Name 1720
25G2SAssociate 16Name 1821
26G2SAssociate 17Name 1922
27
28
Holidays


+Fluff 1.xlsm
ABCD
1
2
3NameName 4
4
5
6
7
8
9Dates Booked05/01/2021
1008/01/2021
11
12
13
Summary
Cell Formulas
RangeFormula
C9:C10C9=LET(Fltr,FILTER(Holidays!P8:AC28,Holidays!D8:D28=C3),TRANSPOSE(FILTER(Holidays!P7:AC7,(Fltr="FH")+(Fltr="Service"),"None")))
Dynamic array formulas.
 
Upvote 0
Solution
That worked perfectly, many thanks I would never have come up with that.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Not quite sure how you got that sample result since Name 4 has "AA" on 5-Jan, not "FH" but try this in C9 of the Lookup Sheet

Excel Formula:
=TRANSPOSE(FILTER(Holidays!P7:AC7,INDEX(Holidays!P8:AC26,MATCH(C3,Holidays!D8:D26,0),0)="FH",""))

Hi Peter that works perfectly too I got the date becasue i was just looking for data rather than the term. I wish i could mark you both as solutions
 
Upvote 0
i was just looking for data rather than the term.
If you are just looking for any data in the row then
Excel Formula:
=TRANSPOSE(FILTER(Holidays!P7:AC7,INDEX(Holidays!P8:AC26,MATCH(C3,Holidays!D8:D26,0),0)<>"",""))
 
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