The Oldest Date in a DATA Dump based on Vendor number

mrwjca

New Member
Joined
Sep 28, 2009
Messages
15
Hello,

It has been a while that I popped by here but everything worked for me without issue’s until today.
I have a challenge and I just can’t find the solution right now.

Following problem:
I have a workbook with much data, it is an invoices dump from SAP, I will spare you the details.
Let me see if I can explain what I need.

I have my “DATA” sheet and I have “CONTACT” sheet.
In my “CONTACT” sheet I need to get the DATE of an invoice but it has to be the oldest date. This information has to come from the “DATA” sheet.

In the “DATA” sheet I have my Vendor Column (A) and the Date Column (P)
The date has to show up in the CONTACT sheet Date Column (G) (in this sheet there is also a vendor column (B))

Now I have used:
=SMALL(VLOOKUP(B22;Data!A:P;16;0);1)
And
=MIN(VLOOKUP(B22;Data!A:P;16;0);1)

For the SMALL function it resulted in an old date but the incorrect one, it took10-3-2018 instead 23-6-2017:

Sample info:
23-6-2017
10-3-2018
24-12-2018
28-12-2018
10-3-2019

For the MIN function it resulted in 1-1-1900

So the SMALL Function would be the best but somehow the result is incorrect (All cells are format Short Date)

Where am I going wrong?

Please note I am a bit limited in resources, I am at work and the resources are limited.
Thank you in advance for your help,

Willem
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
both functions should give you the correct answer.
the problem is vlookup will only produce a single answer instead of an array that required.


Book1
ABC
123/06/201723/06/2017
210/03/201823/06/2017
324/12/2018
428/12/2018
510/03/2019
Sheet5
Cell Formulas
RangeFormula
C1=SMALL(A1:A5,1)
C2=MIN(A1:A5)


can try something like this


Book1
ABCDE
123/06/2017V1V123/06/2017
210/03/2018V2V210/03/2018
324/12/2018V2
428/12/2018V1
510/03/2019V1
Sheet5
Cell Formulas
RangeFormula
E1{=SMALL(IF($B$1:$B$5=D1,$A$1:$A$5),1)}
E2{=SMALL(IF($B$1:$B$5=D2,$A$1:$A$5),1)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hi,

Thx for your reply.
Not sure what happened.
But I opened my excel sheet today, vlookup formula still in place (saved it last night).
The result this morning is that I am getting the correct dates.
Need to do some more testing an see if I can find out where it went wrong.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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