Lookup fist date based on criteria

SimonHughes

Active Member
Joined
Sep 16, 2009
Messages
452
Office Version
  1. 365
Platform
  1. Windows
Hello, I have multiple transactions to a customer and want to return the first and last transaction dates. The data table is on one tab "Table" and the returns on another "Data", the primary data has dates in column A (nemce the range and customer name in column B. I have tried this formula for the first date which returns a #VALUE error; =MIN(IF(Table!$B$2:$B$130,Data!H4,Table!$A$2:$A$130)) I have tried this as an array formula and standard formula but neither works.

I can get the fist date by using a LOOKUP function and the last date with the VLOOKUP function but would like a better solution than this.

Any suggestions appreciated.

Using Excel 2016
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Did you commit your formula with Ctrl+Shift+Enter properly ? ( insertion point must be in the formula bar)
Otherwise you can use the AGGREGATE function for the first and last date
I'm sorry I can't help more, I'm out of time
 
Upvote 0
You might want to update your profile to show which version of Excel you are running.
If you have at least Excel 2016, this might work for you.

20210708 MinIfs MaxIfs.xlsx
ABCDEFGHIJK
1DatesCustCustMinMax
21/07/2021abcdabcd1/07/202113/07/2021
31/07/2021abcd
41/07/2021abcd
58/07/2021abcd
69/07/2021abcd
710/07/2021abcd
811/07/2021abcd
912/07/2021abcd
1013/07/2021abcd
111/07/2021next cust
128/07/2021next cust
139/07/2021next cust
1413/07/2021next cust
1513/07/2021next cust
16
Sheet1
Cell Formulas
RangeFormula
I2I2=MINIFS($A$2:$A$130,$B$2:$B$130,$H2)
J2J2=MAXIFS($A$2:$A$130,$B$2:$B$130,$H2)
 
Upvote 0
@Alex Blakenburg the minifs & maxifs are only available in 2019 & 365, not 2016 which the OP is using.

@Fluff, Thanks, I made the mistake of taking the first result that Google offered me.
Lesson learnt, will make sure I try for a Microsoft webpage where possible.

1625742726763.png
 
Upvote 0
Did you commit your formula with Ctrl+Shift+Enter properly ? ( insertion point must be in the formula bar)
Otherwise you can use the AGGREGATE function for the first and last date
I'm sorry I can't help more, I'm out of time
Yes, the formula was entered correctly. Cannot work out how to use the Aggregate function for this one - puzzled.
 
Upvote 0
In that case can you some sample data from both sheets.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,614
Members
449,039
Latest member
Mbone Mathonsi

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