Earliest date with conditions

hrachao

New Member
Joined
Sep 19, 2018
Messages
16
Hi everyone,

Can't seem to make this work...

I have a table like this:

Vendorinvoice nrinvoice date
Alfa111-10-2018
Beta2310-02-2017
Beta2401-03-2015
Delta5806-04-2016
Delta5907-04-2017
Delta6008-04-2018
Gama7001-06-2014
Sigma9102-06-2017
Sigma9203-06-2016

<colgroup><col><col><col></colgroup><tbody>
</tbody>


And I need to find the earliest invoice date per vendor:

Vendorearliest invoice date
Alfa?
Beta?
Delta?
Gama?
Sigma?

<colgroup><col><col></colgroup><tbody>
</tbody>

Ideas?

Thanks for the help!

Helena
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Re: Help - earliest date with conditions

Like this:

=MIN(IF($A$2:$A$10=E1,$C$2:$C$10))

Enter CTRL-SHIFT-ENTER. Put a vendor to test in E1 and your table in A1:C10
 
Upvote 0
Re: Help - earliest date with conditions

Options using newer functions ..
If you have the MINIFS function (available in Excel 365) you can use the column B formula.
If you have at least Excel 2010 you can use the column C formula.

Excel Workbook
ABC
1Vendorinvoice nrinvoice date
2Alfa111/10/2018
3Beta2310/02/2017
4Beta241/03/2015
5Delta586/04/2016
6Delta597/04/2017
7Delta608/04/2018
8Gama701/06/2014
9Sigma912/06/2017
10Sigma923/06/2016
11
12
13Vendorearliest invoice date
14Alfa11/10/201811/10/2018
15Beta1/03/20151/03/2015
16Delta6/04/20166/04/2016
17Gama1/06/20141/06/2014
18Sigma3/06/20163/06/2016
Earliest Date
 
Upvote 0
Re: Help - earliest date with conditions

or you can try PowerQuery aka Get&Transform

Vendorinvoice nrinvoice dateVendorMin
Alfa
1​
11/10/2018​
Alfa
11/10/2018​
Beta
23​
10/02/2017​
Beta
01/03/2015​
Beta
24​
01/03/2015​
Delta
06/04/2016​
Delta
58​
06/04/2016​
Gama
01/06/2014​
Delta
59​
07/04/2017​
Sigma
03/06/2016​
Delta
60​
08/04/2018​
Gama
70​
01/06/2014​
Sigma
91​
02/06/2017​
Sigma
92​
03/06/2016​

Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"invoice date", type date}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Vendor"}, {{"Min", each List.Min([invoice date]), type date}})
in
    #"Grouped Rows"[/SIZE]
 
Upvote 0
Re: Help - earliest date with conditions

Thanks everyone! The formulas you guys presented work on the simplified table i gave as example, but not when I apply it to my real example... I still can't figure out why... trying to understand now (I get 00-01-1900) :S
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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