Cell lookup formula help

lewis_blackburn

New Member
Joined
Jul 31, 2008
Messages
11
Could someone please help me with what seems like should be an easy formula? I have a range of cells with row and column headings and I want to lookup a cell in that range by those headings. For example, for the range that look like this:

<TABLE><TBODY><TR><TD></TD><TD>Jan</TD><TD>Feb</TD><TD>Mar</TD></TR><TR><TD>Stock</TD><TD>100</TD><TD>300</TD><TD>200</TD></TR><TR><TD>Bond</TD><TD>110</TD><TD>330</TD><TD>220</TD></TR><TR><TD>Cash</TD><TD>140</TD><TD>360</TD><TD>250</TD></TR></TBODY></TABLE>

I want a function to get me of the value of the cell with the column heading "Mar" and the row heading "Bond". My first attempt was to use the SUMIFS function like this...

=SUMIFS(B2:D4, B1:D1, "Mar", A2:A4, "Bond")

...where the correct answer would be 220 but that is not working. Can someone please point me in the right direction?

Thanks!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Try Index/Match

Formula in A10 is
=INDEX(B2:D4,MATCH(A8,A2:A4,0),MATCH(A7,B1:D1,0))

A7 = Mar
A8 = Bond

See below..

Hope that helps.


Excel Workbook
ABCD
1JanFebMar
2Stock100300200
3Bond110330220
4Cash140360250
5
6
7Mar
8Bond
9
10220
Sheet1
 
Upvote 0
You could also use a formula such as:
=Bond Mar
but first you have to use the Create Names from selection dialogue:
Select the table including headers top and left, then
In Excel 2007-2010:
Formulas Ribbon, Create from selection
In earlier versions:
from the menu at the top: Insert|Name|Create…

The rest is the same in both versions:
Check the checkboxes labelled Top Row and Left Column, and click OK.
That's it.

In version prior to xl2007, you can do it without creating Names! Go to
Tools|Options, Calculation Tab, check the 'Accept labels in formulas' chaeckbox, and use th same formula.
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,310
Members
452,906
Latest member
phanmemchatdakenhupviral

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