Alternative to the pivot table

00alex00

New Member
Joined
Jun 18, 2015
Messages
40
Hello I am searching an alternative to the pivot table.

Since the pivot table works only if data are in the same header (column) how can I select a certain type of date for a given reference?

Let me explain here. I have a similar situation as below:

IDDateValue 1Value2IDDateValue 1Value2IDDateValue 1Value2IDDateValue 1Value2
127/02/2019AAA129227/02/2019B140327/02/2019CC28427/02/2019CCC1
126/02/2019AAA239226/02/2019B230326/02/2019CC48426/02/2019CCC65654
125/02/2019AAA34225/02/2019B44325/02/2019CC29425/02/2019CCC39876
124/02/2019AAA56224/02/2019B49324/02/2019CC46424/02/2019CCC234
123/02/2019AAA32223/02/2019B20323/02/2019CC51423/02/2019CCC5
122/02/2019AAA34222/02/2019B22322/02/2019CC51422/02/2019CCC6
121/02/2019AAA23221/02/2019B11321/02/2019CC51421/02/2019CCC54
120/02/2019AAA3220/02/2019B-9320/02/2019CC51420/02/2019CCC0
119/02/2019AAA6666219/02/2019B6654319/02/2019CC51419/02/2019CCC3
118/02/2019AAA5218/02/2019B-7318/02/2019CC51418/02/2019CCC2

<tbody>
</tbody>



I need to fill below table:

Date21/02/2019
IDValue 1Value 2
1
2
3
4

<tbody>
</tbody>

Since I have more than 4 ids I don't want to put them manually under the same column.

Is there an index match or some other formula to search values for a specific date?

Thanks
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Do you mean as follows...

Excel 2010
ABCDEFGHIJKLMNOP
1DDateValue 1Value2IDDateValue 1Value2IDDateValue 1Value2IDDateValue 1Value2
2127/02/2019AAA129227/02/2019B140327/02/2019CC28427/02/2019CCC1
3126/02/2019AAA239226/02/2019B230326/02/2019CC48426/02/2019CCC65654
4125/02/2019AAA34225/02/2019B44325/02/2019CC29425/02/2019CCC39876
5124/02/2019AAA56224/02/2019B49324/02/2019CC46424/02/2019CCC234
6123/02/2019AAA32223/02/2019B20323/02/2019CC51423/02/2019CCC5
7122/02/2019AAA34222/02/2019B22322/02/2019CC51422/02/2019CCC6
8121/02/2019AAA23221/02/2019B11321/02/2019CC51421/02/2019CCC54
9120/02/2019AAA3220/02/2019B-9320/02/2019CC51420/02/2019CCC0
10119/02/2019AAA6666219/02/2019B6654319/02/2019CC51419/02/2019CCC3
11118/02/2019AAA5218/02/2019B-7318/02/2019CC51
12
13
14Date21/02/2019
15IDValue 1Value 2
161AAA23
172B11
183CC51
194CCC54
20

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
C16=INDEX($B$2:$D$11,MATCH($C$14,$B2:$B11,0),2)
D16=INDEX($B$2:$D$11,MATCH($C$14,$B2:$B11,0),3)
C17=INDEX($F$2:$H$11,MATCH($C$14,F2:F11,0),2)
D17=INDEX($F$2:$H$11,MATCH($C$14,$F$2:$F$11,0),3)
C18=INDEX($J$2:$L$11,MATCH($C$14,J2:J11,0),2)
D18=INDEX($J$2:$L$11,MATCH($C$14,$J$2:$J$11,0),3)
C19=INDEX($N$2:$P$11,MATCH($C$14,N2:N11,0),2)
D19=INDEX($N$2:$P$11,MATCH($C$14,$N$2:$N$11,0),3)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Thanks.

This works the only problem that I have to insert a lot of formula since I have more than 100 ids.

Do you think I can create a macro to collect all the info under the same column then create a pivot table?

Thanks
 
Upvote 0
You could try this. It worked on my computer. Put this in C16. It should work copying and pasting the formula.

=INDEX(OFFSET(C$2:C$11,0,($B16-1)*4),MATCH($C$14,OFFSET($B$2:$B$11,0,($B16-1)*4),0))
 
Upvote 0
One modification in case a match isn't found.

=IFERROR(INDEX(OFFSET(C$2:C$11,0,($B16-1)*4),MATCH($C$14,OFFSET($B$2:$B$11,0,($B16-1)*4),0)), "NA")
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,382
Members
448,889
Latest member
TS_711

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