+ Reply to Thread
Results 1 to 10 of 10

Having trouble with array formulas

  1. #1
    Registered User
    Join Date
    10-02-2014
    Location
    Plymouth, MA
    MS-Off Ver
    2010
    Posts
    6

    Having trouble with array formulas

    There is an existing excel Maintenance program that is no longer working on my computer, I must have done something to the formulas by accident and saved it.

    The Maintenance program uses some type of Array formula that use dates to from one sheet, to tell me when certain procedures are due on another sheet. These dates are determined by a pair of dates that I input into cells H7 and I7 on the "weekly" sheet.

    Below are screen shots and the formulas for the two cells that I'm having a problem with.

    Cell H12 --> =SUMPRODUCT((Master!F6:F188>=Weekly!H7<=I7),((Master!C6:C188="Annual")+(Master!C6:C188="Semi-")+(Master!C6:C188="Quarterly")+(Master!C6:C188="Monthly")))

    Cell A26 --> =IF(ROWS(A$26:A26)>Weekly!$H$12,"",INDEX(Master!A$6:A188,SMALL(IF((Master!$F$6:$F188>=Weekly!$H$7)*(Master!$F$6:$F188<=Weekly!$I$7)*((Master!$C$6:$C188="Annual")+(Master!$C$6:$C188="Semi-")+(Master!$C$6:$C188="Quarterly")+(Master!$C$6:$C188="Monthly")),ROW(Master!A$6:A188)-ROW(Master!A$6)+1),ROWS(A$26:A26))))

    Cell A26 formula is then expanded by dragging the bottom right corner to the other cells that have the #VALUE! in them as well.

    Here is the excel sheet:

    Master Maintenance.xlsx
    Attached Images Attached Images
    Last edited by vrenaut74; 10-02-2014 at 10:34 AM. Reason: Attached the actual excel sheet

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Having trouble with array formulas

    Hi,

    an attempt, I cannot see your attachments: probably you did not confirm correctly array formula.

    In A26, press F2 and confirm the formula with control+shift+enter.

    Again: just an attempt
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    10-02-2014
    Location
    Plymouth, MA
    MS-Off Ver
    2010
    Posts
    6

    Re: Having trouble with array formulas

    Quote Originally Posted by canapone View Post
    Hi,

    an attempt, I cannot see your attachments: probably you did not confirm correctly array formula.

    In A26, press F2 and confirm the formula with control+shift+enter.

    Again: just an attempt
    Sorry about that, I'll try to get that fixed.

    I have tried CTRL + Shift + ENT with no luck.

  4. #4
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Having trouble with array formulas

    What are you trying to do with the first term of the SUMPRODUCT?

    Please Login or Register  to view this content.
    That will return FALSE basically no matter what, so what is it supposed to be doing instead?



    Anyway, please post your spreadsheet instead of just a screencap. That will be much easier to troubleshoot.

  5. #5
    Registered User
    Join Date
    10-02-2014
    Location
    Plymouth, MA
    MS-Off Ver
    2010
    Posts
    6

    Re: Having trouble with array formulas

    Quote Originally Posted by ben_hensel View Post
    What are you trying to do with the first term of the SUMPRODUCT?

    Please Login or Register  to view this content.
    That will return FALSE basically no matter what, so what is it supposed to be doing instead?



    Anyway, please post your spreadsheet instead of just a screencap. That will be much easier to troubleshoot.
    Someone else wrote the formula, they are no longer here, I am just trying to troubleshoot it.

    That piece of formula, I'm guessing, is telling excel to only mention the "weekly" maintenance that is in between the dates entered into cells H7 and I7.

    I am trying to to attach my excel spreadsheet but it is not letting me, I'll try to get it to work.

    thanks

  6. #6
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Having trouble with array formulas

    Master!F6:F188>=Weekly!H7<=I7

    That is saying this:

    F6:F188>=H7

    Which will return something like (based on the values)

    {TRUE;TRUE;FALSE;TRUE;FALSE;FALSE;TRUE....}

    The second part is doing this

    {TRUE;TRUE;FALSE;TRUE;FALSE;FALSE;TRUE....}<=I7

    So if I7 is any number LARGER than 0 it will do this
    {FALSE;FALSE;FALSE;FALSE;FALSE;FALSE;FALSE...}



    ...i think
    Last edited by Speshul; 10-02-2014 at 10:15 AM.
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  7. #7
    Registered User
    Join Date
    10-02-2014
    Location
    Plymouth, MA
    MS-Off Ver
    2010
    Posts
    6

    Re: Having trouble with array formulas

    Quote Originally Posted by ben_hensel View Post
    What are you trying to do with the first term of the SUMPRODUCT?

    Please Login or Register  to view this content.
    That will return FALSE basically no matter what, so what is it supposed to be doing instead?



    Anyway, please post your spreadsheet instead of just a screencap. That will be much easier to troubleshoot.
    Here is the excel sheet.

    Master Maintenance.xlsx

  8. #8
    Registered User
    Join Date
    10-02-2014
    Location
    Plymouth, MA
    MS-Off Ver
    2010
    Posts
    6

    Re: Having trouble with array formulas

    I figured out how to attach my excel sheet, it is in the original post of this thread.

    Could someone see if they can troubleshoot it. Been trying everything but can't figure it out.

    Thanks

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Having trouble with array formulas

    Quote Originally Posted by vrenaut74 View Post
    That piece of formula, I'm guessing, is telling excel to only mention the "weekly" maintenance that is in between the dates entered into cells H7 and I7
    That sort of "between" syntax doesn't work, you have to use two separate checks like (range>111)*(range<999) so in your formula that will be like this:

    =SUMPRODUCT((Master!F6:F188>=H7)*(Master!F6:F188<=I7),(Master!C6:C188="Annual")+(Master!C6:C188="Semi-")+(Master!C6:C188="Quarterly")+(Master!C6:C188="Monthly"))

    For your data, though, that still gives me #VALUE! error because you have some #VALUE! errors in the Master!F6:F188 range - either eliminate those errors so that the above formula works or try using COUNTIFS like this:

    =SUM(COUNTIFS(Master!F6:F188,">="&H7,Master!F6:F188,"<="&I7,Master!C6:C188,{"Annual","Semi-","Quarterly","Monthly"}))
    Audere est facere

  10. #10
    Registered User
    Join Date
    10-02-2014
    Location
    Plymouth, MA
    MS-Off Ver
    2010
    Posts
    6

    Re: Having trouble with array formulas

    Quote Originally Posted by daddylonglegs View Post
    That sort of "between" syntax doesn't work, you have to use two separate checks like (range>111)*(range<999) so in your formula that will be like this:

    =SUMPRODUCT((Master!F6:F188>=H7)*(Master!F6:F188<=I7),(Master!C6:C188="Annual")+(Master!C6:C188="Semi-")+(Master!C6:C188="Quarterly")+(Master!C6:C188="Monthly"))

    For your data, though, that still gives me #VALUE! error because you have some #VALUE! errors in the Master!F6:F188 range - either eliminate those errors so that the above formula works or try using COUNTIFS like this:

    =SUM(COUNTIFS(Master!F6:F188,">="&H7,Master!F6:F188,"<="&I7,Master!C6:C188,{"Annual","Semi-","Quarterly","Monthly"}))
    thank you!

    I will give this a try.

+ 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. Having trouble using a string as the name for an array
    By construct in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-08-2012, 10:38 AM
  2. Array Formula Trouble
    By braydon16 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-30-2010, 05:01 PM
  3. Array trouble
    By martin_b13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2009, 12:08 PM
  4. [SOLVED] trouble with formulas
    By lrneilson in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-20-2008, 01:55 PM
  5. Trouble Passing An Array
    By Kevin O'Neill in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2006, 04:10 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