Calculate the average difference of 2 columns, with conditions

swanniek

New Member
Joined
Jan 12, 2017
Messages
3
Hello!

Apologies if I don't word this correctly,

I have a spreadsheet, In column AB (Actual Finish) is either a data and time that a job was finished, or blanks.
In Column C, Is the start Date.
Column H is the Priority, limited to either P1, P2, P3 or P4

I have built a table with months across the top and Priority going down and I need a formula, please, which can tell me the average length that it took to close all of the P1's closed in January (for example). I like to think I'm clever enough at excel that I can then drag it to fill in the rest of the table. However, I do also need one that is just by month regardless of the priority.

Thank you all very much in advance for your help.

Katie
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi Katie,
Can you please post a sample layout of your sheet? I tried laying it out from your description, but I think I'm misunderstanding something.
 
Upvote 0
w5pcgvnqH175J4_YRtkPKnRZYBR2s7QdC07x6I11ccomKNRyvCyIfo8EUsxFo0LfVle37s99cMnV34qW0aBDAeWz8EM2EtSXP61cyMe_-vSyRSpsfDgmQDM74PL-ESS3C3WQPa-MIC91ze67PHAe6eHrWkloCekf3bjKENx8Elhdre_fULw9ZcNT-XypoXjJJqFGemIJ-_NoLZ5gLEXX0lH9GiJlCQmMYjtggllJBPbwq7krS6YskN9rF-8ueJNBoPlTpqNk8X4schjFamaSty25siwWkFhzTvkd5eEBTcXCm4ugacUDmtXwdfbbnqD1XHosyFnCmZ1ZvyxTSWSuK24HnZAvmqVxE8DXzjX5Iv0f4tWPMSktDL8FBfEte4lvuD8OFu8Eyh1oDD7cuTr3fl9-Q-2zQwC7DuKhPwQfhHJT7CXGgt24hgWWlJPLWbzwxmyO3P6j0k0feVDlmkChLzjf4X1Ab6FX1MaU1Qa5ykSDRWkWgOK7TlG0PRZbkr62LoI0PHsZHpA692yIRoWW2Xo3oSiHgMxaeFKKnaa8pcdUrMZmYXoayx9sOoud6omtHilDs3SVL9ygkqrTv0Qqryl3uB1SofQOHzyfxs8awRk2jvgGHPCu=w1430-h804-no
 
Upvote 0
Why not just add a field to the core data table that is the length per record:

=AB2-C2

etc, then just use a pivot table or two?
 
Upvote 0
I'm just trying to work out how to, apologies and thanks for the response..

What I do (it isn't the most elegant, but it works):
  1. Click "reply" to a message.
  2. Click "Go Advanced".
  3. Copy and paste the cells from Excel into the reply message.
  4. Then left click in the center of the cells you just pasted.
  5. In the menu above the message, click "Table Properties".
  6. In the Table Style selected "Full Grid"
  7. Click OK.
  8. (Then modify the table is you need to.)
 
Upvote 0
Maybe something like this:
Change ranges to match your data then copy down and across.
Excel Workbook
ABCDEFGH
1Start DateEnd DatePriority*Priority / Month101112
210/1/201610/5/16 4:00 PMP1*P14.670.003.00
310/1/201610/16/16 10:00 AMP2*P215.520.000.00
410/15/201610/30/16 3:00 PMP2*P30.0014.774.46
510/30/201611/12/16 12:00 AMP3*P40.008.600.00
610/30/201611/15/16 1:00 PMP3*****
711/12/2016*P4*****
811/7/201611/15/16 2:30 PMP4*****
911/28/201612/1/16 12:00 AMP1*****
1011/30/201612/4/2016 11:00P3*****
Sheet
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,734
Members
449,094
Latest member
dsharae57

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