+ Reply to Thread
Results 1 to 13 of 13

Array Question

  1. #1
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Array Question

    This is embarrassing to ask, but I can't get a formula to work. I have Column A w/ a set of dates. Column B is another set of dates, all greater than their counterparts in Column A. Some dates in B are blank (process not finished). How do I get an average time of completion e.g. average between B-A)

    Added attachment.

    Thanks,

    Vitaly
    Attached Files Attached Files
    Last edited by vichisov; 10-16-2017 at 05:46 PM. Reason: New File.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,288

    Re: Array Question

    And what exactly is the formula??? How are we supposed to help you to troubleshoot it without knowing what you have tried?

    Will you please attach a sample Excel workbook?

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Array Question

    Still working on this problem. Would appreciate any help people can offer.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Array Question

    Maybe =AVERAGE(B1:B26-A1:A26) with Control+Shift+Enter

  5. #5
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Array Question

    Doesn't look like it. At least one issue is the blank cells throwing the formula off with a default value of 0.

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Array Question

    What about ColA if ColB is blank? ( 0 )

    formula above is single result formula not for dragging down

    you can try:
    =AVERAGEIF(B1:B26,"<>""",B1:B26)-AVERAGE(A1:A26)

    but with your description I don't know what you want to achieve.
    Your example file should contain BEFORE and AFTER (result)

    Quote Originally Posted by AliGW View Post
    2. Make sure that your desired solution is also shown (mock up the results manually).
    Last edited by sandy666; 10-16-2017 at 05:32 PM.

  7. #7
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Array Question

    {=Avergae(B:B-A:A)} gives me a neggative number. Same as making Column C where C1=(B1-A1) etc and then averaging that number. The blank cells are all -429##, thus throwing everything off.

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Array Question

    Re-read post#2 point 2
    &
    re-read post #6
    Last edited by sandy666; 10-16-2017 at 05:35 PM.

  9. #9
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Array Question

    Reposted attachment. Couldn't get #6 to work.

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Array Question

    try this one:

    =SUMPRODUCT((B1:B26<>"")*(B1:B26-A1:A26))/COUNT(B1:B26)

    and probably you will need change cell format to general or number.


    If that takes care of your original question, & to say Thanks, please click on Add Reputtion (bottom left corner of the post of the person(s) who helped you)
    then select Thread Tools from the menu (top right corner of your thread) and mark this thread as SOLVED.
    If you did it - ignore it.
    Thank you.
    Attached Files Attached Files
    Last edited by sandy666; 10-16-2017 at 07:14 PM.

  11. #11
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Array Question

    Or:
    Please Login or Register  to view this content.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  12. #12
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Array Question

    It is quite possible that blanks can be in both, A and B columns. Therefor I would suggest an array formula

    ***Array formula
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.
    You will know the array is active when you see curly braces { } appear around your formula.
    If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  13. #13
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Array Question

    Awesome. Both solutions above work perfectly. Thank you!

+ 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. Question about using Evaluate with an array of formulas not an array formula
    By Mr_Bill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2014, 03:26 PM
  2. [SOLVED] Quick Array question - Copy array to another array then resize?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-02-2013, 01:17 AM
  3. array question
    By rbeck in forum Excel General
    Replies: 2
    Last Post: 02-25-2008, 08:37 PM
  4. Question on Array's
    By Dutchbeer in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-16-2007, 04:10 AM
  5. Another ARRAY Question...
    By Trevor Williams in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2006, 10:33 AM
  6. Array Question
    By Renee in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  7. [SOLVED] Array Question
    By Renee in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-29-2005, 03:05 PM

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