Resource Availability Tracker Index Matching

jamezl

New Member
Joined
Apr 28, 2015
Messages
1
Hi There,

I am trying to create a resource availability file in Excel.
I have input data such as the following:
[TABLE="width: 370"]
<colgroup><col><col span="2"><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]Type[/TD]
[TD]Start Date[/TD]
[TD]End Date[/TD]
[/TR]
[TR]
[TD]Person A[/TD]
[TD]Holiday[/TD]
[TD="align: right"]01/05/2015[/TD]
[TD="align: right"]02/05/2015[/TD]
[/TR]
[TR]
[TD]Person B[/TD]
[TD]Training[/TD]
[TD="align: right"]30/04/2014[/TD]
[TD="align: right"]03/05/2015[/TD]
[/TR]
[TR]
[TD]Person B[/TD]
[TD]Holiday[/TD]
[TD="align: right"]08/05/2015[/TD]
[TD="align: right"]09/05/2015[/TD]
[/TR]
[TR]
[TD]Person A[/TD]
[TD]Holiday[/TD]
[TD="align: right"]04/05/2015[/TD]
[TD="align: right"]07/05/2015[/TD]
[/TR]
[TR]
[TD]Person A[/TD]
[TD]Training[/TD]
[TD="align: right"]09/04/2015[/TD]
[TD="align: right"]10/05/2015[/TD]
[/TR]
</tbody>[/TABLE]


What I am trying to do, is to display the data in the following manner:
[TABLE="width: 1426"]
<colgroup><col><col span="2"><col><col span="12"></colgroup><tbody>[TR]
[TD][/TD]
[TD="align: right"]28/04/2015[/TD]
[TD="align: right"]29/04/2015[/TD]
[TD="align: right"]30/04/2015[/TD]
[TD="align: right"]01/05/2015[/TD]
[TD="align: right"]02/05/2015[/TD]
[TD="align: right"]03/05/2015[/TD]
[TD="align: right"]04/05/2015[/TD]
[TD="align: right"]05/05/2015[/TD]
[TD="align: right"]06/05/2015[/TD]
[TD="align: right"]07/05/2015[/TD]
[TD="align: right"]08/05/2015[/TD]
[TD="align: right"]09/05/2015[/TD]
[TD="align: right"]10/05/2015[/TD]
[TD="align: right"]11/05/2015[/TD]
[TD="align: right"]12/05/2015[/TD]
[/TR]
[TR]
[TD]Person A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Holiday[/TD]
[TD]Holiday[/TD]
[TD][/TD]
[TD]Holiday[/TD]
[TD]Holiday[/TD]
[TD]Holiday[/TD]
[TD]Holiday[/TD]
[TD][/TD]
[TD]Training[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Person B[/TD]
[TD][/TD]
[TD][/TD]
[TD]Training[/TD]
[TD]Training[/TD]
[TD]Training[/TD]
[TD]Training[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Holiday[/TD]
[TD]Holiday[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



The formula I have at present appears to only work when I go to the 2nd index, anything beyond that and I get incorrect values. I am not sure if the formula I am using is making this more complex than is needed.
I also have not been able to figure out where to add/how to add if it is a holiday or training.
The formula I have at present is:

=OR(IF(AND(INDEX($A$2:$C$6,SMALL(IF($A$2:$A$6=$A$14,ROW($A$2:$A$6)),ROW(1:1))-1,3)<=C14,INDEX($A$2:$D$6,SMALL(IF($A$2:$A$6=$A$14,ROW($A$2:$A$6)),ROW(1:1))-1,4)>=C14),"True","False"),IF(AND(INDEX($A$2:$C$6,SMALL(IF($A$2:$A$6=$A$14,ROW($A$2:$A$6)),ROW(2:2))-1,3)<=C14,INDEX($A$2:$D$6,SMALL(IF($A$2:$A$6=$A$14,ROW($A$2:$A$6)),ROW(2:2))-1,4)>=C14),"True","False"))

So the data, I posted at the beginning of this thread is in cells A2 to C6.
The name of the "Person A", highlighted in Red above is in cell A14
The dates along the top of the 2nd piece of data I posted is in cell C14.

I am trying to get the formula to read the date along the top and check if the person in column A has training of a holiday on that date. I have built up the above formula from a between I was originally using to check if the date was between these 2 dates. I essentially am trying to figure out how I can use a between to check multiple rows.

I previously used vlookup, but realized Index had to be used due to needing the formula to read multiple lines.

Any help would be much appreciated.

Thanks.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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