Index and Match ??? Help needed

dtwyford

New Member
Joined
Dec 24, 2015
Messages
14
Good day everyone. I could use some guidance. I have table that is used for people to pick dates they want to volunteer their time for. I need to translate the date

from
Bob
Sue
John
Frank
Mary
Gail
Keith
Glenda

<tbody>
[TD="width: 64"][/TD]
[TD="width: 64"]Date 1[/TD]
[TD="width: 64"]Date 2[/TD]
[TD="width: 64"]Date 3[/TD]
[TD="width: 64"]Date 4[/TD]
[TD="width: 64"]Date 5[/TD]
[TD="width: 64"]Date 6[/TD]

[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x
[/TD]

[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"][/TD]

[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"] x [/TD]

[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]

[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]

[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]

[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]

[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"] x [/TD]
[TD="class: xl65, align: center"][/TD]

</tbody>

to
[TABLE="width: 320"]
<colgroup><col style="width:48pt" width="64" span="5"> </colgroup><tbody>[TR]
[TD="width: 64, align: center"][/TD]
[TD="width: 64, align: center"]Person 1[/TD]
[TD="width: 64, align: center"]Person 2[/TD]
[TD="width: 64, align: center"]Person 3[/TD]
[TD="width: 64, align: center"]Person 4[/TD]
[/TR]
[TR]
[TD]Date 1
[/TD]
[TD="class: xl65, align: center"] Sue
[/TD]
[TD="class: xl65, align: center"] Frank
[/TD]
[TD="class: xl65, align: center"] Gail
[/TD]
[TD="class: xl65, align: center"] Glenda
[/TD]
[/TR]
[TR]
[TD]Date 2[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]
[/TD]
[TD="class: xl65"] [/TD]
[/TR]
[TR]
[TD]Date 3[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]
[/TD]
[/TR]
[TR]
[TD]Date 4[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]
[/TD]
[/TR]
[TR]
[TD]Date 5[/TD]
[TD="class: xl65"]
[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]
[/TD]
[/TR]
[TR]
[TD]Date 6[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[/TR]
</tbody>[/TABLE]

I am looking for a dynamic formula for the "TO" table. Any thoughts?

D
 

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)
Copy cell L3 to all other cells in the Range(L3:O8).


Excel 2010
KLMNO
Date 1
Date 2
Date 3
Date 4
Date 5
Date 6

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Person 1[/TD]
[TD="align: center"]Person 2[/TD]
[TD="align: center"]Person 3[/TD]
[TD="align: center"]Person 4[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"][/TD]
[TD="align: center"]Sue[/TD]
[TD="align: center"]Frank[/TD]
[TD="align: center"]Gail[/TD]
[TD="align: center"]Glenda[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]

[TD="align: center"]4[/TD]

[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]5[/TD]

[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]x[/TD]
[TD="align: center"]x[/TD]

[TD="align: center"]6[/TD]

[TD="align: center"]x[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]

[TD="align: center"]7[/TD]

[TD="align: center"][/TD]
[TD="align: center"]x[/TD]
[TD="align: center"][/TD]
[TD="align: center"]x[/TD]

[TD="align: center"]8[/TD]

[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]x[/TD]
[TD="align: center"][/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]L3[/TH]
[TD="align: left"]=IF(INDEX($B$3:$G$10,MATCH(L$2,$A$3:$A$10,0),MATCH($K3,$B$2:$G$2,0))="x","x","")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Jim,

Thanks, but not quite. The green names are an example of what I want the "TO" table to look like.
The "FROM" Tables top row is the dates, the left most column are the names, the cells under and to the right are the various selections I need to translate / pivot into the "TO" table.
Any tweaks you can recommend?
D

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH]L3[/TH]
[TD="align: left"]=IF(INDEX($B$3:$G$10,MATCH(L$2,$A$3:$A$10,0),MATCH($K3,$B$2:$G$2,0))="x","x","")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
[/QUOTE]
 
Upvote 0
To accomplish the bringing over of the Names I am unable to do it in using a formula. But I can via VBA.
So here's the (Standard Module) Code.

Rich (BB code):
Sub EliminateBlankRowsWhenCopying()
lr = Range("B" & Rows.Count).End(xlUp).Row 'Your from table Date 1 Column
Set Rng = Range("B3:B" & lr)
Application.Calculation = xlCalculationManual
    Rng.SpecialCells(xlCellTypeConstants).Offset(0, -1).Copy
    Worksheets("Sheet1").Range("L2").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, Transpose:=True
Application.Calculation = xlCalculationAutomatic
End Sub
 
Upvote 0
With a formula


Excel 2013/2016
ABCDEFGHIJKLMN
1Date 1Date 2Date 3Date 4Date 5Date 6Person 1Person 2Person 3Person 4
2BobxxxDate 1SueFrankGailGlenda
3SuexxxDate 2SueFrankMaryKeith
4JohnxxxDate 3BobJohnGailGlenda
5FrankxxxDate 4BobSueMaryKeith
6MaryxxxDate 5JohnFrankKeithGlenda
7GailxxxDate 6BobJohnMaryGail
8Keithxxx
9Glendaxxx
Appendix
Cell Formulas
RangeFormula
K2=IFERROR(INDEX($A$2:$A$9,AGGREGATE(15,6,ROW($A$2:$A$9)-ROW($A$2)+1/(($B$1:$G$1=$J2)*($B$2:$G$9="x")),COLUMNS($A:A))),"")
 
Upvote 0
Jim ,Thank you.
Darren




To accomplish the bringing over of the Names I am unable to do it in using a formula. But I can via VBA.
So here's the (Standard Module) Code.

Rich (BB code):
Sub EliminateBlankRowsWhenCopying()
lr = Range("B" & Rows.Count).End(xlUp).Row 'Your from table Date 1 Column
Set Rng = Range("B3:B" & lr)
Application.Calculation = xlCalculationManual
    Rng.SpecialCells(xlCellTypeConstants).Offset(0, -1).Copy
    Worksheets("Sheet1").Range("L2").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, Transpose:=True
Application.Calculation = xlCalculationAutomatic
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,301
Members
452,633
Latest member
DougMo

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