+ Reply to Thread
Results 1 to 8 of 8

Need help with an array formula using 2 tables.

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    washington
    MS-Off Ver
    Excel 365 version 4209
    Posts
    76

    Need help with an array formula using 2 tables.

    Hi everyone,
    I have a workbook that has many sheets and I want to combine totals from all the sheets onto one sheet. I have received alot of help with this workbook already but have run into another situation that I think should be simple but can't figure it out.

    In the attached workbook on the Jan 2016 Tabl3 6 7 sheet, is Table 6 A14:H22,
    Dbl CK Totals sheet is where the formula I am using is located K4 (highlighted).
    K4 has the correct answer. K6 should be 546.52. Using table 6 and 7 (A23:G30) it should be (E16*F16)+(E18*G18)+(C25*F25).

    Everything works fine with my formula IF the name in table 6 is only there one time. When I have to put it in 2 times (example BL) then the formula reads table 6 twice. I don't know why!

    I am using the array (CTRL+SHIFT+ENTER) but still no luck. Here is the formula I am trying to use

    {=SUMIF(Table6[COST OF CARE /Add-ons / Staff Trainings / Trainer],'Dbl Ck Totals'!$B6,Table6[Column4])*SUMIF(Table6[COST OF CARE /Add-ons / Staff Trainings / Trainer],'Dbl Ck Totals'!$B6,Table6[Jan])+SUMIF(Table7[ADD-ONS],'Dbl Ck Totals'!$B6,Table7[Column2])*SUMIF(Table7[ADD-ONS],'Dbl Ck Totals'!$B6,Table7[Jan])+SUMIF(Table6[COST OF CARE /Add-ons / Staff Trainings / Trainer],'Dbl Ck Totals'!$B6,Table6[Column4])*SUMIF(Table6[COST OF CARE /Add-ons / Staff Trainings / Trainer],'Dbl Ck Totals'!$B6,Table6[Jan2])+SUMIF(Table7[ADD-ONS],'Dbl Ck Totals'!$B6,Table7[Column2])*SUMIF(Table7[ADD-ONS],'Dbl Ck Totals'!$B6,Table7[Jan2])}

    Also if I remove the BL from A18 then the formula works fine.

    I am so confused!! Thank you everybody for your help with this.
    Attached Files Attached Files

  2. #2
    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
    53,049

    Re: Need help with an array formula using 2 tables.

    This would probably be a LOT easier to trouble-shoot if you did not use such long names, and if you used regular ranges, not table format
    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

  3. #3
    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
    53,049

    Re: Need help with an array formula using 2 tables.

    This...
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    becomes this...
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Niot much shorter but (for me anyway), MUCH easier to read.

    Also, dont think that needs to be ARRAY entered

  4. #4
    Registered User
    Join Date
    01-16-2014
    Location
    washington
    MS-Off Ver
    Excel 365 version 4209
    Posts
    76

    Re: Need help with an array formula using 2 tables.

    Thank you for the tip! However, it still does the math twice when the name has 2 lines. So with BL instead of E16*F16 + E18*G18 + C25*F25. It is doing E16*F16 + E18*G18 +E16*F16 + E18*G18 + C25*F25.
    Thank you for any help!

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,036

    Re: Need help with an array formula using 2 tables.

    This array entered formula works, yields the correct amount as stated in post #1, in K6:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Note: this assumes that a name would not appear twice in the range Jan 2016 Tble3 6 7!A24:A28.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,036

    Re: Need help with an array formula using 2 tables.

    Here's a better version of the array entered formula from post #5 that allows for names appearing more than once in Jan 2016 Tble3 6 7!A24:A28:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let us know if you have any questions.

  7. #7
    Registered User
    Join Date
    01-16-2014
    Location
    washington
    MS-Off Ver
    Excel 365 version 4209
    Posts
    76

    Re: Need help with an array formula using 2 tables.

    Thank you!! The formula from post #6 is exactly what I need! It works perfect.
    Again Thank you so much for your time and help!!!

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    19,036

    Re: Need help with an array formula using 2 tables.

    You're Welcome. Thank you for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. Dynamic Sub Tables Based On Master Sheet Array formula & drilling through
    By pamela16 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-16-2019, 05:48 AM
  2. [SOLVED] lookup data in the database of Excel Tables WITHOUT AN ARRAY FORMULA
    By carsto in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 10-20-2015, 06:42 PM
  3. Replies: 3
    Last Post: 03-31-2015, 03:07 PM
  4. Pivot tables and array variables
    By JAdamJ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2005, 11:30 AM
  5. Replies: 0
    Last Post: 07-27-2005, 11:05 AM
  6. Array or Pivot Tables???
    By Lonnie M. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2005, 01:06 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