Help with Index & Match

themev

Board Regular
Joined
Aug 13, 2007
Messages
83
I have a file with dates in column A running from Rows 4:260 and the 50 states as columns in Row 2 across columns B:BA
ROW 2AlabamaArizona...Wyoming
ROW 4, COLUMN A January 2001
....
(A260) May 2022$2.22$2.54$4.64

I am trying to pull data for dates in a different table:
Cell A266 = May 2022
Cell B265 = Alabama

In Cell B266 I put in the formula =INDEX($A$2:$BA$260,MATCH($A266,$A$4:$A$260,0),MATCH($B$265,$B$2:$BA$2,0))
but I am not getting it to return $2.22 which is what I want...I can't even figure out where the number it is pulling is coming from.
What am I doing wrong here?
Thanks for the help!
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Are your dates - real dates or TEXT ??
should work - but INDEX() should be the data range


so B2:Ba260 - not A2 - which is the dates

heres a sample of what i think you are after - but in columns A and row 2 for simplicity

Cell Formulas
RangeFormula
B4:N17B4=B3+13
C23C23=INDEX(B3:N17,MATCH(A23,A3:A17,0),MATCH(B23,B2:N2,0))


Note: Images are difficult to see , and also requires that I input all the data myself, which is very time consuming.

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed
 
Upvote 0
Solution
Thank you so much!
Yes, the issue was the INDEX was not just the data range and when I fixed that it worked perfectly.
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,830
Members
449,096
Latest member
Erald

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