Results 1 to 3 of 3

Thread: How To Use Or Pass A Dynamic Reference In An Array Formula

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0

    How To Use Or Pass A Dynamic Reference In An Array Formula

    Hi,

    I am using a formule as: =SUM(SUMIFS($E:$E;$A:$A;H$1;$C:$C;{"*appel*";"*ban aan*"}))

    However the values {"*appel*";"*banaan*"} change once in a while and i do not want to change the formula everytime (to add or remove a product.

    Is it possible to replace the {"*appel*";"*banaan*"} by a reference cell or reference cells? something like:
    =SUM(SUMIFS($E:$E;$A:$A;H$1;$C:$C;{X1}))

    i tried various things and looked on the forum but i am not able to find an answer on how to do this. I attached an example of the sheet to this thread, any help or ideas are welcome.

    Thanks,
    Wilco
    Attached Files Attached Files

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Use

    =SUMPRODUCT(SUMIFS($D:$D,$A:$A,H$1,$C:$C,Prod1))

    Or

    =SUMPRODUCT(SUMIFS($D:$D,$A:$A,H$1,$C:$C,"*"&Prod2 &"*")) and ensure that the named range is non-empty, and has only values that you need, and for the others use something that you are sure will never be in the list... like "XXX"

    I've shown two methods in the attached workbook that can replicate the 'contains' feature. One uses the wild character "*" on either sides of the values in the cell, and the other uses this as a concatenation to the named range (second formula above)
    Attached Files Attached Files
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Junior Member
    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0
    Hi,

    Thanks a lot for this, I never heard of Named Ranges and that you can use these in formulas. This is really great!

    How did you learn all these things? can you recommend any good Excel learning books/websites/etc...

    Thansk again!

    Wilco

Similar Threads

  1. Create A Dynamic Border Using Excel Native Formula
    By mahmoud-lee in forum Excel Help
    Replies: 4
    Last Post: 06-02-2013, 06:07 AM
  2. Replies: 16
    Last Post: 04-19-2013, 08:20 PM
  3. Combining Functions To Create Array Formula
    By Ryan_Bernal in forum Excel Help
    Replies: 3
    Last Post: 01-07-2013, 12:38 PM
  4. VBA To Pass A Variable In An Excel Formula
    By devcon in forum Excel Help
    Replies: 4
    Last Post: 12-17-2012, 09:12 PM
  5. Replies: 3
    Last Post: 04-08-2012, 09:44 AM

Posting Permissions

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