vlookup on 2 sheets for min or max date in an adjacent column

m09151014

New Member
Joined
Jul 18, 2008
Messages
20
Office Version
  1. 365
I have a workbook with 3 sheets (sheet1, sheet2, sheet3) sheet1 has stores numbers in column A. Sheet2 and sheet3 also have store numbers in column A. I need it to find the store number in sheet2 or/and sheet3 for the store number in column A then give me the min or max date that corresponds with store number in column A in column E on sheet2 or sheet3. Is that possible?
 
I can get the MAXIFS one to work. For a value of sheet 1 in row 3, this formula seems to work:
=MAX(MAXIFS(Sheet2!E:E,Sheet2!A:A,Sheet1!A3),MAXIFS(Sheet3!E:E,Sheet3!A:A,Sheet1!A3))

MINIFS seems to be a bit more challenging, as when it is not found, it is returning a zero.
However, if what you say here is really true:

Then we could to this (for an entry on Sheet1 in row 3):
=MINIFS(Sheet2!E:E,Sheet2!A:A,Sheet1!A3) + MINIFS(Sheet3!E:E,Sheet3!A:A,Sheet1!A3)

But I see that "3" appears in column A on both Sheets 2 and 3 in your example.
Not sure if that is a typo, or what you said about the number won't appear on both sheets is incorrect.
Yes 3 on both sheets was a typo.
BOTH worked!!!!! You have no idea how many days I have worked at this issue and how many Youtube videos I have watched!!! I could cry I am so happy gonna message my boss and tell him I am taking the afternoon off!!!
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Even if they appear in both the sheet you can consider post 9.

Also for 1 in Max 08/04/2020 but in Sheet 3 for 1 you have max as 08/07/2020????
 
Upvote 0
another approach with Power Query

Sheet 2Sheet 3Result
NoDateNoDateNoMinMax
308/08/2020110/07/2020110/07/202014/07/2020
308/09/2020111/07/2020215/07/202019/07/2020
308/10/2020112/07/2020320/07/202008/11/2020
308/11/2020113/07/2020408/04/202008/04/2020
408/04/2020114/07/2020508/06/202008/06/2020
508/06/2020215/07/2020
216/07/2020
217/07/2020
218/07/2020
219/07/2020
320/07/2020
321/07/2020
322/07/2020
323/07/2020

Rich (BB code):
let
    Src1 = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Src2 = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
    App = Table.Combine({Src1, Src2}),
    Group = Table.Group(App, {"No"}, {{"Min", each List.Min([Date]), type datetime}, {"Max", each List.Max([Date]), type datetime}}),
    Sort = Table.Sort(Group,{{"No", Order.Ascending}}),
    Type = Table.TransformColumnTypes(Sort,{{"Min", type date}, {"Max", type date}})
in
    Type
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,286
Members
449,076
Latest member
kenyanscott

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