+ Reply to Thread
Results 1 to 10 of 10

SUM+MATCH+INDEX Function

Hybrid View

  1. #1
    Registered User
    Join Date
    05-11-2017
    Location
    DUBAI
    MS-Off Ver
    Microsoft 365
    Posts
    47

    Post SUM+MATCH+INDEX Function

    Dear Experts,

    I am trying to find out the items value based on below 2 criteria (Company & Month).

    Somebody could help me to solve this formula issue

    Particulars Company Jan Feb Mar Apr
    Salary & allowances AAA 131 88 115 133
    Discount allowed AAA 91 125 107 132
    Rent expenses AAA 130 107 112 111
    Salary & allowances BBB 125 123 102 130
    Discount allowed BBB 109 120 100 109
    Rent expenses BBB 103 121 103 106

    Company ALL
    Month Jan-Mar

    Discount allowed ???


    Formula : SUM(INDEX($C$2:$F$7,MATCH($A13,$A$2:$A$7,0),MATCH(LEFT(B$12,3),$C$1:$F$1,0)):INDEX($C$2:$F$7,MATCH($A13,$A$2:$A$7,0),MAT CH(RIGHT(B$12,3),$C$1:$F$1,0)))

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: SUM+MATCH+INDEX Function

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly 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 information is removed first!!

    4. Try to avoid using merged cells. 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.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    05-11-2017
    Location
    DUBAI
    MS-Off Ver
    Microsoft 365
    Posts
    47

    Re: SUM+MATCH+INDEX Function

    Thank you for your reply

    Sample file attached for your easy ref
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,684

    Re: SUM+MATCH+INDEX Function

    In D29 and copy down


    =SUMPRODUCT(($D$8:$AA$19)*($D$6:$AA$6>=DATE($D$24,MONTH(LEFT(D$25,3)&0),1))*($D$6:$AA$6<=DATE($D$24,MONTH(RIGHT($D$25,3)&0),1))*($D$7:$AA$7=$D$26)*($B$8:$B$19=$D$27)*($C$8:$C$19=$C29))

    in E29 and copy down

    =SUMPRODUCT(($D$8:$AA$19)*($D$6:$AA$6>=DATE($D$24,MONTH(LEFT(E$25,3)&0),1))*($D$6:$AA$6<=DATE($D$24,MONTH(RIGHT($D$25,3)&0),1))*($D$7:$AA$7=$E$26)*($C$8:$C$19=$C29))

    I changed dates in row 6 to Excel dates and formatted as "mmm"
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-11-2017
    Location
    DUBAI
    MS-Off Ver
    Microsoft 365
    Posts
    47

    Re: SUM+MATCH+INDEX Function

    I tried with this formula. but unfortunately its not working for me. Attached my file for your ref.
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: SUM+MATCH+INDEX Function

    A couple of changes to JT's formula and your sheet.

    1. Change the months in Data, row 6 to real dates, formatted to look like month names.

    2. Change end date search term by addition of an EOMONTH bit (JT's ran from Jan 1st to March 1st).

    3. Change in handling of "all". If cell XX = All, do this, otherwise do that. It makes for a long formula, but it works.

    incidentally, John... how did you pick up on that nice Jan0 term???
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-11-2017
    Location
    DUBAI
    MS-Off Ver
    Microsoft 365
    Posts
    47
    It works for me

    Today is my first day in this group.
    I am really happy to be here.
    Thank you very much for your great assistance.
    I really appreciate it.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,684

    Re: SUM+MATCH+INDEX Function

    @GK: probably from you!!!

    It is something that has appeared on this forum fairly frequently and it is one of the few "tricks" I remember when it comes to converting text dates to real dates.

    As I am sure you know, I much prefer that real dates are used and then simply format these as required.

    (Not sure why change to EOMONTH: dates in row 6 are all 1st of month so <= DATE($D$24,MONTH(RIGHT($D$25,3)&0),1) will work as it effectively a month check: certainly did on the posted file).

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: SUM+MATCH+INDEX Function

    Possibly so, JT, and that's worrying, too!

    Regarding dates, on the version I looked at: the row 6 dates were just Jan, Feb, etc: text, not dates...

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: SUM+MATCH+INDEX Function

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. Need help in Index, Match usage to match multiple criteria in sum function
    By Summer0830 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-26-2017, 02:47 AM
  2. Replies: 1
    Last Post: 06-10-2015, 12:56 PM
  3. Problems applying INDEX-MATCH-MATCH function on other data
    By LennartB in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-13-2015, 05:33 AM
  4. function INDEX MATCH MATCH doesn´t work
    By leonelcd in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-31-2015, 11:36 AM
  5. [SOLVED] Stuck on Match function with #N/A; attempting to reverse Index/Match
    By Cappytano in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-10-2014, 06:39 PM
  6. Replies: 6
    Last Post: 03-17-2014, 08:10 PM
  7. Replies: 3
    Last Post: 06-17-2013, 12:37 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