MAXIFs not working.

ItalianPlatinum

Well-known Member
Joined
Mar 23, 2017
Messages
893
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I am trying to find a way when to locate the max time when two jobs execute at the same time. Instance 1 and 2 will start at the same time but may finish at different times. So I need to know the elapsed time for the two jobs to complete. See below for XLBB. As you can see it just pulls zero.

Book1
ABCDEFGHIJK
1REPLACE(REPLACE(G3,15,1,":"),18,1,":")REPLACE(REPLACE(H3,15,1,":"),18,1,":")MAXIFS($J$3:$J$214,$F$3:$F$214,K3,$A$3:$A$214,A3)
2ACCOUNTInstanceTO_DATESTATUSDAYSSUBMISSIONEXECUTIONCOMPLETIONEXECUTION_TIMECOMPLETION_TIMEMAX TIME
3AB110/3/2024C103-OCT-2024 02.36.20.000000000 PM03-OCT-2024 02.36.29.678000000 PM03-OCT-2024 02.36.38.681000000 PM03-OCT-2024 02:36:29.678000000 PM03-OCT-2024 02:36:38.681000000 PM0
4AB210/3/2024C103-OCT-2024 02.36.20.000000000 PM03-OCT-2024 02.36.29.921000000 PM03-OCT-2024 02.36.38.881000000 PM03-OCT-2024 02:36:29.921000000 PM03-OCT-2024 02:36:38.881000000 PM0
5CA110/3/2024C103-OCT-2024 03.36.20.000000000 PM03-OCT-2024 03.36.29.678000000 PM03-OCT-2024 03.37.29.678000000 PM03-OCT-2024 03:36:29.678000000 PM03-OCT-2024 03:37:29.678000000 PM0
6CA210/3/2024C103-OCT-2024 03.36.20.000000000 PM03-OCT-2024 03.36.29.921000000 PM03-OCT-2024 03.38.29.678000000 PM03-OCT-2024 03:36:29.921000000 PM03-OCT-2024 03:38:29.678000000 PM0
7BC110/3/2024C103-OCT-2024 03.46.20.000000000 PM03-OCT-2024 03.46.29.921000000 PM03-OCT-2024 03.49.28.921000000 PM03-OCT-2024 03:46:29.921000000 PM03-OCT-2024 03:49:28.921000000 PM0
8BC210/3/2024C103-OCT-2024 03.46.20.000000000 PM03-OCT-2024 03.46.29.921000000 PM03-OCT-2024 03.49.31.921000000 PM03-OCT-2024 03:46:29.921000000 PM03-OCT-2024 03:49:31.921000000 PM0
Sheet1
Cell Formulas
RangeFormula
I3:J8I3=REPLACE(REPLACE(G3,15,1,":"),18,1,":")
K3:K8K3=MAXIFS($J$3:$J$214,$F$3:$F$214,K3,$A$3:$A$214,A3)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
The MAXIFS function is really designed to work on valid numeric or date/time values.
You appear to be working with TEXT values. So since TEXT entries have a value of 0, your MAXIFS function will return a 0.
The left-justification and triangle in the upper left corner of your entries in columns I and J are telling you that these are Text values.

To coerce them to valid date/time value, simply add zero to the end of your formulas in columns I and J, i.e.
Rich (BB code):
=REPLACE(REPLACE(G3,15,1,":"),18,1,":")+0
The result will look like a strange number, because Excel stores dates and times as numbers, specifically the number of days since 1/0/1900. But if you simply format these columns in your desired date/time format, you will see the dates and times like you are used to.

Now that the values in columns I and J are valid date/time entries, you will be able to use MAXIFS functions on them.

EDIT:
Note: I have not evaluated your MAXIFS function yet, as you need to fix the data first. But I am guessing that you may have issues there too, as you appear to have a circular reference.
 
Last edited:
Upvote 0
Solution
After you fix the data like I said, I believe that your formula in cell K3 should look something like this:
Excel Formula:
=MAXIFS($J$3:$J$214,$I$3:$I$214,I3)
 
Upvote 0
I think that worked. I had to create another submission column in order to achieve the +0 as you mentioned. Once I did that and changed the MAXIFs to reference the formulas with +0 it seems to be working

1734449705210.png
 
Upvote 0
Excellent!
I am glad that worked out for you.
 
Upvote 0

Forum statistics

Threads
1,226,114
Messages
6,189,052
Members
453,522
Latest member
Seeker2025

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