Index - Match Help

andyt2005

Board Regular
Joined
Jul 20, 2014
Messages
50
Hi all, Im after a bit of help with INDEX/Match.

I have a sheet with different months on different rows (In date formats)
and im trying to get index/match to search the whole table for a specific date then return a row underneath it.
I have never used Index/match before so at a bit of a loss.

Table example;

date/date/date/date etc.
data/data/data/data etc.
data/data/data/data etc.

date/date/date/date etc.
data/data/data/data etc.
data/data/data/data etc.

And so one

Thanks in advance.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Because if the dates are unique and in sequential order you could use something like this. MATCH finds the location of the date typed into A1. A "1" is added to that date because you want the next line in the data and INDEX is used to return that date. This date appears in B1. Then VLOOKUP finds the data assocated with the date in B1.


Excel 2010
ABCDEF
11-Aug9/15/2015Data26Data27Data28Data29
2
31-JanData1Data2Data3Data4Data5
45-AprData6Data7Data8Data9Data10
56-JulData11Data12Data13Data14Data15
612-JulData16Data17Data18Data19Data20
71-AugData21Data22Data23Data24Data25
815-SepData26Data27Data28Data29Data30
Sheet1
Cell Formulas
RangeFormula
B1=INDEX(A3:A8,MATCH(A1,A3:A8,0)+1)
C1=VLOOKUP($B$1,$A$3:$F$8,2)
D1=VLOOKUP($B$1,$A$3:$F$8,3)
E1=VLOOKUP($B$1,$A$3:$F$8,4)
F1=VLOOKUP($B$1,$A$3:$F$8,5)
 
Upvote 0
Yeah sorry all dates appear once. A sample of my table is below. So if I want to get the figure in the 3rd row for the 15/07 how would I go about it?

Code:
01/06	02/06	03/06	04/06	05/06	06/06	07/06	08/06	09/06	10/06	11/06	12/06	13/06	14/06	15/06	16/06	17/06	18/06	19/06	20/06	21/06	22/06	23/06	24/06	25/06
2	0													99										
														56										
									123					123										
																								
												July												
01/07	02/07	03/07	04/07	05/07	06/07	07/07	08/07	09/07	10/07	11/07	12/07	13/07	14/07	15/07	16/07	17/07	18/07	19/07	20/07	21/07	22/07	23/07	24/07	25/07
														555										
														66
 
Upvote 0
Your data is coming through a little weird. but try something like this:


Excel 2010
ABCDEFGHIJKLMNOPQ
10=HLOOKUP(A12,INDIRECT("A"&14+B12-1&":Y"&14+B12-1+3),3)
11"14" is the first row of your data. The "3" inside the INDIRECT statement indicates the number of rows you want your Hlookup to look.
1215-Jul766The last "3" in the equation is the row you desired. You wanted the 3rd row. But it could be 2nd or 1st.
13The "Y" is the last column of your data.
141-Jun2-Jun3-Jun4-Jun5-Jun6-Jun7-Jun8-Jun9-Jun10-Jun11-Jun12-Jun13-Jun14-Jun15-Jun16-Jun17-Jun
152099
1656
17123123
18
19July
201-Jul2-Jul3-Jul4-Jul5-Jul6-Jul7-Jul8-Jul9-Jul10-Jul11-Jul12-Jul13-Jul14-Jul15-Jul16-Jul17-Jul
21555
2266
Sheet1
Cell Formulas
RangeFormula
C12=HLOOKUP(A12,INDIRECT("A"&14+B12-1&":Y"&14+B12-1+3),3)
B12{=MATCH(MONTH(A12),MONTH(A14:A20),0)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,207,261
Messages
6,077,363
Members
446,280
Latest member
Danielosama

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