+ Reply to Thread
Results 1 to 7 of 7

Spreadsheet that may have criteria that is duplicated

  1. #1
    Registered User
    Join Date
    10-07-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    51

    Spreadsheet that may have criteria that is duplicated

    I need some help. I have a report that is downloaded into an excel format which was small for one month but as I am getting information from other months it has now grown. I have to find certain criteria and report the total for that criteria. Need to find 3 matches and get the total of the matches Here is my problem. Need to match Column A first which is always a different number, then match column B which may have the same number down that column within the entire report. Then I need to match the word Total which is on Column C which is the same within the entire report and get the result on Column E across from Total. Sometimes the word Total may be one row down from the first two criteria's or maybe 2 rows down or even 3 rows down. This report is going to continue to grow so the criteria's will not be in the same row all the time. The Columns will be the same. I had previously gotten help which worked with the small report but not with the larger report. Below is the formula that worked with the small report. This report has other information on other columns but I only need to match column A-E. I created an example which is attached

    =VLOOKUP("total",INDEX($C$1:$C$99,AGGREGATE(15,6,ROW($A$1:$A$99)/($A$1:$A$99&$B$1:$B$99="5520"),1)):$E$99,2,)
    Attached Files Attached Files
    Last edited by ps3623; 10-16-2018 at 09:25 PM.

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Spreadsheet that may have criteria that is duplicated

    The current formula ($A$1:$A$99&$B$1:$B$99="5520") is for look at 55 from column A and 20 from column B
    At the end 2,) 2 is for column index that vlookup will return value, if you want to return number in colums E then from C to E is 3 column

    =VLOOKUP("total",INDEX($C$1:$C$99,AGGREGATE(15,6,ROW($A$1:$A$99)/($A$1:$A$99&$B$1:$B$99="5520"),1)):$E$99,3,)

  3. #3
    Registered User
    Join Date
    10-07-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    51

    Re: Spreadsheet that may have criteria that is duplicated

    Using this formula I go the result for 5520 which was 50 but if I want to get the result for 55 40 I get a #NUM!, which I should get 200. I have to get various totals from this spreadsheet. Column A is the main category and Column B is the subcategories for Column A. So the 40 could also be under other main categories.

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

    Re: Spreadsheet that may have criteria that is duplicated

    One way:

    =VLOOKUP("total",INDEX(INDEX($C$1:$C$100,MATCH($H$2,$A$1:$A$100,0)):$C$100,MATCH($H$3,INDEX($B$1:$B$100,MATCH($H$2,$A$1:$A$100,0)):$B$100,0)):$E$100,3,FALSE)

    I picked up col A and col Bvalues from H2 and H3, to make life easier...


    see sheet.
    Attached Files Attached Files
    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

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Spreadsheet that may have criteria that is duplicated

    Please try
    =VLOOKUP("total",INDEX(C:C,MATCH(40,INDEX(B:B,MATCH(55,A1:A99,)):B99,)+MATCH(55,A1:A99,)):E99,3,)

  6. #6
    Registered User
    Join Date
    10-07-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    51

    Re: Spreadsheet that may have criteria that is duplicated

    Thank you both I used Glen's way and it worked.

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

    Re: Spreadsheet that may have criteria that is duplicated

    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. countinfs with 2 criteria, need to add non duplicated count
    By Mark_Delaware in forum Excel General
    Replies: 6
    Last Post: 12-21-2014, 04:22 PM
  2. Replies: 11
    Last Post: 07-04-2014, 07:10 AM
  3. [SOLVED] delete duplicated rows based on a criteria in another column
    By melody10 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-08-2013, 06:53 AM
  4. [SOLVED] Extract duplicated values based on an extra criteria
    By Eduard in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-21-2013, 05:50 AM
  5. Replies: 1
    Last Post: 12-12-2009, 03:34 PM
  6. Call out Duplicated Cells within spreadsheet
    By moongate in forum Excel General
    Replies: 4
    Last Post: 07-30-2009, 03:57 AM
  7. Duplicated Spreadsheet
    By Alec Shaw in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-08-2005, 02:06 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