VLOOKUP on Dates

MikeyZ

Well-known Member
Joined
Mar 14, 2002
Messages
553
I know when you do a Vlookup on a date , say 4/16/1, it's going to pull the first one it finds and nothing else.
Suppose I have any number of lines showing a specific date, is there a way I can pull the sequential info from the cells in that column?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
The common solution looks like this:


Book1
ABCDE
1DateValueLookup Date:01/01/2018
201/01/2018aValues:a
302/01/2018bd
403/01/2018cg
501/01/2018d
602/01/2018e
703/01/2018f
801/01/2018g
Sheet1
Cell Formulas
RangeFormula
E2{=IFERROR(INDEX($B$1:$B$8,SMALL(IF($A$1:$A$8=$E$1,ROW($A$1:$A$8)-ROW($A$1)+1),ROWS($E$2:$E2))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.


Copy formula in E2 down as necessary. Adjust cell references to suit your data.

WBD
 
Upvote 0
Need to be a bit more specific.
VLOOKUP returns one value, no more.

Are you saying you have multiple rows showing the same date and wish to return all of them?

Usual answer is something like this

=IFERROR(INDEX(range1,SMALL(IF((range1=specificdate),ROW(range1)),ROW(A1))-(ROW(firstrowofrange)-1),column number),"")
Array formula, use Ctrl-Shift-Enter

Post best post some example data.
You cant attach files on this forum. There are tools on this forum for adding small spreadsheet images

https://www.mrexcel.com/forum/about-board/508133-attachments.html

Or upload the file to an online storage site and post a link to it, though some people may not download the file for fear of viruses.
 
Upvote 0
True. I should be a bit more explicit.
I run the VLOOKUP fx down the column.
I will then only pick up the first hit it comes across and go no further.

I have several PO's due on 4/16/18.
I want to show in my daily returns those PO's that are due 4/16/18.
 
Upvote 0
True. I should be a bit more explicit.
I run the VLOOKUP fx down the column.
I will then only pick up the first hit it comes across and go no further.

I have several PO's due on 4/16/18.
I want to show in my daily returns those PO's that are due 4/16/18.

Hi!

Another way (with WBD's layout):

In E2 and copy down

=IFERROR(INDEX(B$2:B$8,MATCH(0,INDEX(COUNTIF(E$1:E1,B$2:B$8)+(A$2:A$8<>E$1),),0)),"")

Markmzz
 
Upvote 0
trying to figure out how to use this fx.
I don't understand the CountIF criteria..

I have my static date in $C$6.

My data is in another sheet named POLINES.
AJ is where I am going to pull the PO# from.
AL is where the due date is located that will match up with $C$6.

S
 
Upvote 0
trying to figure out how to use this fx.
I don't understand the CountIF criteria..

I have my static date in $C$6.

My data is in another sheet named POLINES.
AJ is where I am going to pull the PO# from.
AL is where the due date is located that will match up with $C$6.

S

Hi!

Try this in D6 of the Main sheet (the sheet where you have the static date - $C$6) and copy down

=IFERROR(INDEX(POLINES!$AJ$2:$AJ$8,
MATCH(0,INDEX(COUNTIF($D$5:$D5,POLINES!$AJ$2:$AJ$8)+(POLINES!$AL$2:$AL$8<>$C$6),),0)),"")


ABCDEFAIAJAKALAMAN
1Sheet1PO'sDateSheet
2Main2PO0101/04/2018POLINES
33PO0202/04/2018
44PO0303/04/2018
5DatePO's5PO0404/04/2018
601/04/2018PO016PO0501/04/2018
7PO057PO0602/04/2018
88PO0703/04/2018
99
1010
1111
1212
**************************************************************************

<tbody>
</tbody>


By the way, how many rows your data have?

Markmzz
 
Upvote 0

Forum statistics

Threads
1,215,712
Messages
6,126,408
Members
449,313
Latest member
tomgrandy

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