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.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
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")
 
Upvote 0

Forum statistics

Threads
1,213,514
Messages
6,114,078
Members
448,547
Latest member
arndtea

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