+ Reply to Thread
Results 1 to 9 of 9

Table, sumif for index(match())

Hybrid View

  1. #1
    Registered User
    Join Date
    06-13-2013
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    29

    Table, sumif for index(match())

    Gentleman, I've tried other topics and matrix lookup with sumif but didnt find a solution for my case, some one have a glue on how to do that?

    Table 1
    Product State Condition Discount Price 1 Price 2 Price 3
    Car 1 TX Used 1% 4362 5962 4737
    Car 1 TX Used 2% 4123 5961 9397
    Car 2 TX Used 3% 4660 3745 7282
    Car 2 TX Used 4% 1063 5305 6737
    Car 1 TX New 1% 3528 6394 9192
    Car 1 TX New 2% 3404 3503 9795
    Car 2 TX New 3% 2463 3726 2026
    Car 2 TX New 4% 6218 3784 9580
    Car 1 NY Used 1% 2328 5156 2075
    Car 1 NY Used 2% 2511 8106 7857
    Car 2 NY Used 3% 4344 8190 7571
    Car 2 NY Used 4% 6885 1667 4039
    Car 1 NY New 1% 1233 2465 7968
    Car 1 NY New 2% 6952 7070 3265
    Car 2 NY New 3% 1141 3097 4122
    Car 2 NY New 4% 9703 3208 7431

    Table 2
    Product State Condition Discount Column2 Column1 Price 1 Price 2 Price 3
    Car 1 TX Used 8485
    Car 2 TX New 6932


    formula in Price 1 column Car 1 row

    sum if [table 2],[Product]= [table 1],[Product] and [table 2],[State] = [table 1],[State] and [table 2],[Condition] =[table 1],[Condition] and [table 2],[Headers],[Price 1]=match([Table 1][All][Headers] in this case the formula would be in the Price 1 column and Car 1 row
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Table, sumif for index(match())

    In G23

    =SUMIFS(E$4:E$19,$A$4:$A$19,$A23,$B$4:$B$19,$B23,$C$4:$C$19,$C23)

    Copy down and across
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    06-13-2013
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Table, sumif for index(match())

    Ty Ace, Sumifs master!

    I did not know this sumifs, perfect

    Here in the table system =SUMIFS(Table60[[#All],[Price 1]],Table60[[#All],[Product]],[@Product],Table60[[#All],[State]],[@State],Table60[[#All],[Condition]],[@Condition])


    Another thing, how can I make a condition to make the sum range (first criteria) to be equal the column header name?

  4. #4
    Registered User
    Join Date
    06-13-2013
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Table, sumif for index(match())

    What I'm trying to do
    {=IFERROR(INDEX(Table60[Price 1],MATCH(1,([@Product]=Table60[[#All],[Product]])*([@State]=Table60[[#All],[State]])*([@Condition]*Table60[[#All],[Condition]]),0)),"no Match")}
    But did not work, Ace, I'll try your suggestion, Ty

  5. #5
    Registered User
    Join Date
    06-13-2013
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Table, sumif for index(match())

    I have tried a Index(match) on the table60[Price 1] but did not
    =IFERROR(INDEX(Table60[Price 1],MATCH(1,([@Product]=Table60[[#All],[Product]])*([@State]=Table60[[#All],[State]])*([@Condition]*Table60[[#All],[Condition]]),0)),"no Match")

    The problem is that index(match) dont return the column range I want

    Ace, the problem is that in my real worksheet the prices columns are not in order and in sequence. I want to check the table header and if its equal in both table I do the sumifs, thank you your solution really help a lot
    Last edited by souza.eq; 07-30-2015 at 05:21 PM.

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Table, sumif for index(match())

    One of the reasons I don't use tables.

    With the solution based on ranges (in post # 2) you can simply copy the formula across

  7. #7
    Registered User
    Join Date
    06-13-2013
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Table, sumif for index(match())

    Still needing the match header solution, thank you!

  8. #8
    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,048

    Re: Table, sumif for index(match())

    Try this...
    =SUMIFS(OFFSET($E$3,1,MATCH(G$22,$E$3:$G$3,0)-1,16,1),$A$4:$A$19,$A23,$B$4:$B$19,$B23,$C$4:$C$19,$C23)
    (I converted your tables to ranges, I find them better to work with, but this should still work)

    the ,16 (bolded) is the amount of rows you are dealing with. If your summary table was not below your data table, I could have used COUNTA(B:B)-1 instead
    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

  9. #9
    Registered User
    Join Date
    06-13-2013
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Table, sumif for index(match())

    Actually my table is dynamic and can increase or decrease accordingly the scenario I'm evaluating. Thank you for the effort FDibbins.

+ 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. [SOLVED] Sumif and Index Match
    By freqzz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-27-2014, 03:32 AM
  2. sumif, index, match?
    By ebarbin in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-02-2014, 12:01 AM
  3. Replies: 3
    Last Post: 05-08-2013, 02:10 PM
  4. Need Help with summing cells in a table using the SUMIF with Index/Match
    By Sun144 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-17-2013, 04:07 PM
  5. Match index and Sumif
    By Katherine Venn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-21-2012, 02:31 PM
  6. [SOLVED] SUMIF with INDEX MATCH in table
    By adamski911 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-18-2012, 09:40 AM
  7. can i use sumif, index and match together?
    By go14344 in forum Excel General
    Replies: 2
    Last Post: 05-08-2012, 08:38 PM

Tags for this Thread

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