Consulting

Results 1 to 4 of 4

Thread: Average Number of Days

  1. #1

    Average Number of Days

    I have a spreadsheet that has the completion dates of various steps in a process. I need to get the average number of days between each step based on the number of units. I started using formulas, but I've already run into some problems (blank cells the most obvious). I've attached a small sample of the spreadsheet. The actual list will vary each quarter and probably be ~1000 rows. I also have to take the numbers and put them in a table for presentation.

    I would prefer to do this in VBA (great learning experience), but I need a shove in the right direction.

    Thanks,
    Kathyb0527

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Not VBA, but a formula

    =AVERAGE(IF(I3:I19<>"",I3:I19))
    this is an array formula, so commit with Ctrl-Shift-Enter not just Enter
    Last edited by Aussiebear; 04-20-2023 at 05:39 AM. Reason: Adjusted the code tags
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Thanks XLD. Can a named range be used in an array formula? The number of rows will be changing and I'd like to just use a dynamic named range instead of having to change all of the formulas.

    Kathyb0527

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Yes, no problem.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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