# Index Match question

#### odonovanc

##### New Member
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.

 Location Revenue Expenses Boston 150000 168000 Chicago 99000 107910 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>

 Boston Chicago Dallas Denver Houston Nw York San 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
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

#### odonovanc

##### New Member
That got it. Thanks.

#### AhoyNC

##### Well-known Member
You're welcome. Thanks for the feedback.

Replies
10
Views
816
Replies
1
Views
278
Replies
3
Views
316
Replies
0
Views
263
Replies
3
Views
386

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.

### Which adblocker are you using?

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

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