Finding the lowest date in of a particular year

maria90

New Member
Joined
Apr 9, 2012
Messages
38
I've got two table ranges: CustomerID and Date. I'd like to find out the lowest date of a particular customer and year.
Example:

[TABLE="width: 151"]
<tbody>[TR]
[TD]CustomerID[/TD]
[TD] Date[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]13.02.2014[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]03.04.2014[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]08.08.2014[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]01.12.2014[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]01.01.2015[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]01.02.2015[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]01.03.2015[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]01.04.2015[/TD]
[/TR]
</tbody>[/TABLE]

I tried to use SUMPRODUCT to find the lowest date for customer 1.
=SUMPRODUCT((Orders[CustomerID]=1)*(Year(Orders[Date]=2014)*(MIN(Orders[Date]))


Now this doesn't work. I tried (array) IF formulas, but they don't seem to work either.
What would you do in order to find the lowest date/the first order of a customer?

Thanks
Maria
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
One way:

[Table="width:, class:grid"][tr][td]Row\Col[/td][td]
A​
[/td][td]
B​
[/td][td]
C​
[/td][td]
D​
[/td][td]
E​
[/td][/tr][tr][td]
1​
[/td][td]
ID
[/td][td]
Date
[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
2​
[/td][td]
1​
[/td][td]
13 Feb 2014​
[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
3​
[/td][td]
2​
[/td][td]
03 Apr 2014​
[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
4​
[/td][td]
1​
[/td][td]
08 Aug 2014​
[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
5​
[/td][td]
1​
[/td][td]
01 Dec 2014​
[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
6​
[/td][td]
1​
[/td][td]
01 Jan 2015​
[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
7​
[/td][td]
6​
[/td][td]
01 Feb 2015​
[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
8​
[/td][td]
7​
[/td][td]
01 Mar 2015​
[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
9​
[/td][td]
8​
[/td][td]
01 Apr 2015​
[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
10​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
11​
[/td][td]
ID
[/td][td]
2014​
[/td][td]
2015​
[/td][td][/td][td][/td][/tr]
[tr][td]
12​
[/td][td]
1​
[/td][td]
13 Feb 2014​
[/td][td]
01 Jan 2015​
[/td][td][/td][td]B12: {=IFERROR(1 / (1/MIN(IF(($A$2:$A$9 = $A12) * (YEAR($B$2:$B$9) = B$11), $B$2:$B$9))), "")}[/td][/tr]
[tr][td]
13​
[/td][td]
2​
[/td][td]
03 Apr 2014​
[/td][td][/td][td][/td][td][/td][/tr]
[tr][td]
14​
[/td][td]
6​
[/td][td][/td][td]
01 Feb 2015​
[/td][td][/td][td][/td][/tr]
[tr][td]
15​
[/td][td]
7​
[/td][td][/td][td]
01 Mar 2015​
[/td][td][/td][td][/td][/tr]
[tr][td]
16​
[/td][td]
8​
[/td][td][/td][td]
01 Apr 2015​
[/td][td][/td][td][/td][/tr]
[/table]
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,928
Members
452,366
Latest member
TePunaBloke

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