+ Reply to Thread
Results 1 to 7 of 7

Cant find how to get average dates difference between averaged cells, w/out extra cells

  1. #1
    Registered User
    Join Date
    03-26-2014
    Location
    Washington
    MS-Off Ver
    Excel 2010
    Posts
    2

    Cant find how to get average dates difference between averaged cells, w/out extra cells

    I'd like a report using only one cell that will take the average of Column B - the average of column A to see what the average turn around time is.

    The formula I have is below but it's not working...
    =SUM(AVERAGE(B:B)/COUNTIFS(B:B,">0",A:A, ">0")-(AVERAGE(A:A)/COUNTIFS(A:A,">0",B:B,">0")))

    I tried the below formula and it didn't work either...
    =SUM(AVERAGE(B:B)/COUNTIF(B:B,">0")-(AVERAGE(A:A)/COUNTIF(A:A,">0")))

    I found if I use 3 cells I can make it work by doing AVERAGE(B:B) in one cell, AVERAGE(A:A) in another then in the third cell just doing =SUM() of the two cells.

    How can I make this work?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Cant find how to get average dates difference between averaged cells, w/out extra cell

    Hi Jeremy,

    Welcome to the forum!

    You have a lot of data where you either don't have a Scrubbed Date or there is a Completed Date missing.

    How do you want to deal with this?

    I would be inclined to have a "helper column" with the formula =IF(AND(A2>0,B2>0),B2-A2,"") - copied down, then use the =AVERAGE(C:C)

    I hope this helps, please let me know!

    Regards,

    David

    When you reply please make it clear WHO you are responding to by mentioning their name.

    If this has been of assistance, please advise. A little thanks goes a long way.
    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Cant find how to get average dates difference between averaged cells, w/out extra cell

    Hi jeremy and welcome to the forum,

    See my answer that is an Array formula and needs to be entered using a Ctrl+Shift+Enter stroke. I don't know how you did your problem but it seems you can only average the rows where both dates are given. I've used a zero if either date was missing and this makes the answer unusual. See the attached..
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    03-26-2014
    Location
    Washington
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Cant find how to get average dates difference between averaged cells, w/out extra cell

    Hi David A Coop,

    Thank you for your help!

    I've stripped this down since there's a lot of personal info I cant share that would go on the sheet. The blanks will need to stay on the sheet and I can't have any helper columns so I'm looking for a way to weed out the blanks and calculate the average without another column.

  5. #5
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Cant find how to get average dates difference between averaged cells, w/out extra cell

    Hi Jeremy,

    I think you will find that Marvin has proposed an elegant solution! His formula was -

    =AVERAGE((B2:B1105<>"")*(A2:A1105<>"")*(B2:B1105)-(B2:B1105<>"")*(A2:A1105<>"")*(A2:A1105)) Don't forget, this is an ARRAY formula to be entered using Ctrl+Shift+Enter.

    This works well, and there is no need for a helper column, Marvin only included it to show both possibilities.

    That said, please don't be afraid of helper columns! They don't even have to be on the same sheet! However, they often make calculations much easier to understand. Marvin's formula works beautifully, but it is quite complex. An inexperienced Excel user would be totally confused!

    I hope this helps, please let me know!

    Regards,

    David

    When you reply please make it clear WHO you are responding to by mentioning their name.

    If this has been of assistance, please advise. A little thanks goes a long way.
    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Cant find how to get average dates difference between averaged cells, w/out extra cell

    Maybe Im missing something, but why not just use a pair of regulat AVERAGE()'s? or even
    =AVERAGEIF(A2:A3000,">0")-AVERAGEIF(B2:B3000,">0")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  7. #7
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Cant find how to get average dates difference between averaged cells, w/out extra cell

    Hi Ford,

    That was my first thought, but the problem is with the data! Sometimes Col A has a date, but Col B is blank - and vice versa, so you get a different answer.

    Regards,

    David

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Formula to average range of cells only if difference between values is no more than 1
    By aaron85w in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-28-2013, 07:12 AM
  2. [SOLVED] find blank cells in column and average the cells below
    By desibabuji in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-03-2013, 12:03 PM
  3. Replies: 0
    Last Post: 09-27-2012, 01:38 AM
  4. [SOLVED] How do you find the difference between two cells in a macro?
    By jr13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2012, 07:21 PM
  5. Random Selection of cells and values averaged.
    By rahulk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-02-2009, 12:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1