Index Match question

odonovanc

New Member
Joined
Oct 4, 2017
Messages
46
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.

LocationRevenueExpenses
Boston150000168000
Chicago99000107910
Dallas#REF!#REF!
Denver#REF!#REF!
Houston#REF!#REF!
Nw York#REF!#REF!
San Francisco#REF!#REF!


<colgroup><col><col span="3"></colgroup><tbody>
</tbody>


BostonChicagoDallasDenverHoustonNw YorkSan Francisco
Revenue 150,000 168,000 188,160 210,739 236,028 264,351 296,073
Expenses 99,000 107,910 117,622 128,208 139,747 152,324 166,033

<colgroup><col><col span="7"></colgroup><tbody>
</tbody>


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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
4,759
Office Version
  1. 365
Platform
  1. Windows
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
 

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
4,759
Office Version
  1. 365
Platform
  1. Windows
You're welcome. Thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,312
Messages
5,635,492
Members
416,860
Latest member
coen078

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
Top