Excel Formula Help: MAXIFS over two sheets

Rob_010101

Board Regular
Joined
Jul 24, 2017
Messages
198
Office Version
  1. 365
Platform
  1. Windows
Hello,

A formula I am trying to use:

Excel Formula:
=IF(A2<>0, MAXIFS('Current 6 months'!J:J, 'Current 6 months'!A:A, A2)+MAXIFS('Previous 6 months'!J:J, 'Previous 6 months'!A:A, A2), "")

Is returning weird results.

1667212975568.png


It has to look over two sheets and return the latest absence start date from column J

- =IF(A2 is the employee ID
- 'current 6 months'!J:J and 'previous 6 months'!J:J' are the columns where the dates are
- 'current 6 months'!A:A', A2 and 'previous 6 months'!A:A', A2 is the employee ID, matching A2 in the main sheet.

So, it's basically looking at in column A in the main sheet where the formula is, then finding the same employee ID in column A in both sheets, looking down column J in each and returning the latest date.

Hope that makes sense.

Kind Regards
Chris
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
How about
Excel Formula:
=IF(A2<>0, MAX(MAXIFS('Current 6 months'!J:J, 'Current 6 months'!A:A, A2),MAXIFS('Previous 6 months'!J:J, 'Previous 6 months'!A:A, A2)), "")
 
Upvote 0
Solution
How about
Excel Formula:
=IF(A2<>0, MAX(MAXIFS('Current 6 months'!J:J, 'Current 6 months'!A:A, A2),MAXIFS('Previous 6 months'!J:J, 'Previous 6 months'!A:A, A2)), "")
It was as simple as that.

Thanks very much!
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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