find the mins between two times in to different columns AND only if they meet the criteria of a third column

Timothy.w.Hayes

New Member
Joined
Aug 5, 2011
Messages
7
I need a formula that will find the mins between two times in to different columns AND only if they meet the criteria of a third column. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
In Column C, I have Different types of Changes to my environment. Emergency, Standard, ect… . In Column A I have the start time of that the Change in that row. In Column B I have the time that the change ended. I need to find the Average time for all the Emergency changes in one cell and an average time for all Standard Changes in another cell. <o:p></o:p>
Some of the Start times are days apart and some are only mins apart. I have a couple that the start and end times are over a week apart. <o:p></o:p>
Any Ideas? <o:p></o:p>
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I'm assuming you mean minutes (mins) not minimum like the MIN function.

=AVERAGE(IF(C1:C100="Emergency",IF(ISNUMBER((B1:B100-A1:A100)),(B1:B100-A1:A100)*1440)))

Confirm with CTRL-SHIFT-ENTER rather than just Enter.
 
Upvote 0
Below formula works Great ... but I need to add one more thing. In another column I have different Software. Below I have it shown in Column A. My Syntax is all wrong.

This works...
=AVERAGE(IF(CRs!K3:K76="Emergency"),IF(ISNUMBER((CRs!H3:H76-CRs!G3:G76)),(CRs!H3:H76-CRs!G3:G76)*1440)))

Now I need to add a second qualifyer. (CRs!A3:A76,"Software Name")),

=AVERAGE(IF(CRs!K3:K76="Emergency")and(CRs!A3:A76,"Software Name")),IF(ISNUMBER((CRs!H3:H76-CRs!G3:G76)),(CRs!H3:H76-CRs!G3:G76)*1440)))

How should that read?
 
Upvote 0
=AVERAGE(IF(D1:D100="Emergency",IF(A1:A100="Software Name",IF(ISNUMBER((C1:C100-B1:B100)),(C1:C100-B1:B100)*1440))))

Confirm with CTRL-SHIFT-ENTER rather than just Enter.
 
Upvote 0
I am getting a #VALUE! message. I have verified the spelling Of the searched entry and the range of the search and the Name of the sheet.
Checked with Ctrl+Shift+Enter.

Any Ideas?
 
Upvote 0
Entry reads....

=AVERAGE(IF(CRs!K3:K76="Emergency",IF(CRs!A3:A76,"Software name",IF(ISNUMBER((CRs!H3:H76-CRs!G3:G76)),(CRs!H3:H76-CRs!G3:G76)*1440))))

I know we are close...
 
Upvote 0
=AVERAGE(IF(CRs!K3:K76="Emergency",IF(CRs!A3:A76="Software Name",IF(ISNUMBER((CRs!H3:H76-CRs!G3:G76)),(CRs!H3:H76-CRs!G3:G76)*1440))))

It was an "=" instead of a "," that was needed!

Thank you so much for your help. You have helped more than you will EVER know.
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,308
Members
452,904
Latest member
CodeMasterX

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