VLOOKUP to return column header based on column index value

gmmark1125

New Member
Joined
Oct 24, 2017
Messages
5
Here's a fun one! I have a gantt chart production schedule (Table 1) I use to show my team the schedule. Supply Chain also uses this tool to do material planning but it is a LONG process since they have to manually look at the gantt chart to see when jobs start or end. What I'm trying to do is have a table (Table 2) of the jobs populate their start and end dates. I have the start date formula correct but the end date I am struggling with.

We use the production quantity of the job to show when the job will be completed on the gantt chart. I tried to create a type of VLOOKUP that would reference the job quantity to determine the column number of the formula, and ultimately return the column header (date). Any ideas??



Table 1:

2/192/202/212/222/23
0050001
0050015

<tbody>
</tbody>


Table 2:

JobQtyStartEnd
00500012/202/23
00500152/212/22

<tbody>
</tbody>
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi,

Say your table 1 is located in range A1:E3 ...

and 005000 in Table 2 is located In celle A6 ...

Then in cell C1 you can have : =INDEX($1:$1,MATCH(A6,$2:$2,0))

and in cell D6 ... the array formula : INDEX($1:$1,MATCH(TRUE,ISNUMBER(INDIRECT(ADDRESS(2,MATCH(A6,$2:$2,0)+1,4)):E2),0)+MATCH(A6,$2:$2,0))

HTH
 
Upvote 0

Forum statistics

Threads
1,215,221
Messages
6,123,701
Members
449,117
Latest member
Aaagu

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