Index Match question

odonovanc

Board Regular
Joined
Oct 4, 2017
Messages
60
Office Version
  1. 365
I suspect I need to use a different function but I am trying to lookup data and in one tab the city name is in one column, but the tab with the data the city names are spread out over manmy columns.

[TABLE="width: 278"]
<colgroup><col><col span="3"></colgroup><tbody>[TR]
[TD]Location[/TD]
[TD][/TD]
[TD]Revenue[/TD]
[TD]Expenses[/TD]
[/TR]
[TR]
[TD]Boston[/TD]
[TD][/TD]
[TD="align: right"]150000[/TD]
[TD="align: right"]168000[/TD]
[/TR]
[TR]
[TD]Chicago[/TD]
[TD][/TD]
[TD="align: right"]99000[/TD]
[TD="align: right"]107910[/TD]
[/TR]
[TR]
[TD]Dallas[/TD]
[TD][/TD]
[TD="align: center"]#REF![/TD]
[TD="align: center"]#REF![/TD]
[/TR]
[TR]
[TD]Denver[/TD]
[TD][/TD]
[TD="align: center"]#REF![/TD]
[TD="align: center"]#REF![/TD]
[/TR]
[TR]
[TD]Houston[/TD]
[TD][/TD]
[TD="align: center"]#REF![/TD]
[TD="align: center"]#REF![/TD]
[/TR]
[TR]
[TD]Nw York[/TD]
[TD][/TD]
[TD="align: center"]#REF![/TD]
[TD="align: center"]#REF![/TD]
[/TR]
[TR]
[TD]San Francisco[/TD]
[TD][/TD]
[TD="align: center"]#REF![/TD]
[TD="align: center"]#REF!

[/TD]
[/TR]
</tbody>[/TABLE]


[TABLE="width: 624"]
<colgroup><col><col span="7"></colgroup><tbody>[TR]
[TD][/TD]
[TD]Boston[/TD]
[TD]Chicago[/TD]
[TD]Dallas[/TD]
[TD]Denver[/TD]
[TD]Houston[/TD]
[TD]Nw York[/TD]
[TD]San Francisco[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Revenue[/TD]
[TD] 150,000[/TD]
[TD] 168,000[/TD]
[TD] 188,160[/TD]
[TD] 210,739[/TD]
[TD] 236,028[/TD]
[TD] 264,351[/TD]
[TD] 296,073[/TD]
[/TR]
[TR]
[TD]Expenses[/TD]
[TD] 99,000[/TD]
[TD] 107,910[/TD]
[TD] 117,622[/TD]
[TD] 128,208[/TD]
[TD] 139,747[/TD]
[TD] 152,324[/TD]
[TD] 166,033[/TD]
[/TR]
</tbody>[/TABLE]


I am trying this formula to no success:
=INDEX(Sample!$C$4:$I$5,MATCH(A2,Sample!$C$2:$I$2,0),MATCH(C$1,Sample!$B$4:$B$5,0))


Can someone help
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Looks like all you need to do is reverse your MATCH functions.

Excel Workbook
ABC
1LocationRevenueExpenses
2Boston15000099000
3Chicago168000107910
4Dallas188160117622
5Denver210739128208
6Houston236028139747
7Nw York264351152324
8San Francisco296073166033
Sheet2
Excel Workbook
ABCDEFGHI
1
2BostonChicagoDallasDenverHoustonNw YorkSan Francisco
3
4Revenue150,000168,000188,160210,739236,028264,351296,073
5Expenses99,000107,910117,622128,208139,747152,324166,033
Sample
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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