Index / Match Formula

rbahbah

Board Regular
Joined
Oct 23, 2008
Messages
63
Hi all,

I think I can solve this with using the index match formula. Here are the two tables that I have. I am looking for a formula to insert in table 1 that I can copy and paste (with absolute values) that pulls the total amount per month and per city from the 2nd table below.

Much appreciated!

City
FebruaryMarch
TokyoFormula goes hereFormula goes here
MilanFormula goes hereFormula goes here

<tbody>
</tbody>


MonthTokyoMilan
February2000014500
March2100015000

<tbody>
</tbody>
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
If your first table has "city" in A1, then in B2:
=INDEX($B$7:$C$8,MATCH(B$1,$A$7:$A$8,0),MATCH($A2,$B$6:$C$6,0))
Drag it down and over to fill the table (or copy paste)

Alternatively, you could copy-paste special the whole second table and transpose :)
 
Last edited:
Upvote 0
I'm not sure which would be more efficient but you could try these

=INDEX($B$7:$C$8,MATCH(B$1,$A$7:$A$8,0),MATCH($A2,$B$6:$C$6,0))

or maybe

=SUMPRODUCT(($A$7:$A$8=B$1)*($B$6:$C$6=$A2),$B$7:$C$8)


A
B
C
1
City</SPAN>
February</SPAN>
March</SPAN>
2
Tokyo</SPAN>
20000</SPAN>
21000</SPAN>
3
Milan</SPAN>
14500</SPAN>
15000</SPAN>
4
5
6
Month</SPAN>
Tokyo</SPAN>
Milan</SPAN>
7
February</SPAN>
20000</SPAN>
14500</SPAN>
8
March</SPAN>
21000</SPAN>
15000</SPAN>

<TBODY>
</TBODY>
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,165
Members
448,870
Latest member
max_pedreira

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