Find smallest date based on the condition of another cell

fileninja

New Member
Joined
Mar 3, 2010
Messages
2
I have a table with customer orders which are dated and index by customer id:

customer1, 1/1/2002, etc...
customer2, 1/1/2003, etc...
customer2, 1/1/2004, etc...
customer1, 1/1/2005, etc...

I want to find the date of the first and last order a customer made with me. The end report I want is:

Name, First Order, Last Order
customer1, 1/1/2002, 1/1/2005
customer2, 1/1/2003, 1/1/2004

I already have a unique list of the customers for the report, I need the formula for 'First Order' which is likely almost the same as 'Last Order'.

I've been working on different reports all day and this site is invaluable. Thanks kindly.
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
Control+shift+enter, not just enter:

=MIN(IF(CustomerRange=Customer,DateRange))

=MAX(IF(CustomerRange=Customer,DateRange))

Or with some control:

=IF(ISNUMBER(MATCH(Customer,CustomerRange,0)),MIN(IF(CustomerRange=Customer,DateRange)),"Not Available")
 

Watch MrExcel Video

Forum statistics

Threads
1,122,710
Messages
5,597,702
Members
414,164
Latest member
ARTW

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
Top