+ Reply to Thread
Results 1 to 6 of 6

Sumif, Vlookup, Index/Match Issue?

Hybrid View

marting Sumif, Vlookup, Index/Match... 08-01-2012, 10:29 PM
SCLai Re: Sumif, Vlookup,... 08-01-2012, 10:35 PM
marting Re: Sumif, Vlookup,... 08-01-2012, 10:52 PM
benishiryo Re: Sumif, Vlookup,... 08-01-2012, 10:55 PM
vlady Re: Sumif, Vlookup,... 08-01-2012, 11:54 PM
marting Re: Sumif, Vlookup,... 08-02-2012, 12:43 AM
  1. #1
    Registered User
    Join Date
    10-06-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Sumif, Vlookup, Index/Match Issue?

    Hi there,

    I have a simple problem I think, but I can't seem to figure out a good formula to get it going. So in the first column I have letters running down the page and in the 2nd column I have numbers that are associated with each letter. I want to get the sum of these numbers if the letters beside it equal the letters in the 3rd column (B, E, H) so the resulting answer should be 16. It needs to be some kind of array formula I believe. I know I can use vlookup and add the 3 vlookups but it needs to a bit smarter than that. Any help would be much appreciated!

    A 12 B
    B 4 E
    C 6 H
    D 9
    E 11
    F 3
    G 2
    H 1

  2. #2
    Forum Contributor SCLai's Avatar
    Join Date
    08-18-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    129

    Re: Sumif, Vlookup, Index/Match Issue?

    Hi, you may want to try this:

    =B1+IF(C1="",0,INDEX(B:B,MATCH(C1,A:A,0)))

    Place this in any column for Row 1, then drag the formula down the column.

    Hope this is what you are looking for!

    SC
    Do give a * (bottom left) if the post helped!

  3. #3
    Registered User
    Join Date
    10-06-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Sumif, Vlookup, Index/Match Issue?

    Hi SC,

    Thanks for your help. I was hoping for one formula that would go into one cell. Thanks,

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Sumif, Vlookup, Index/Match Issue?

    hi marting, there are 2 ways you can do it.

    1. transpose your data in column C manually to make it horizontal (instead of C1:C3, make it C1:E1). then use:
    =SUMPRODUCT((A1:A8=C1:E1)*(B1:B8))

    2. use a transpose formula inside an array:
    =SUMPRODUCT((A1:A8=TRANSPOSE(C1:C8))*(B1:B8))

    2nd formula to confirm with CTRL + SHIFT + ENTER

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Sumif, Vlookup, Index/Match Issue?

    if you want array you can do it like this...

    =SUM(IF((A1:A8=C1)+(A1:A8=C2)+(A1:A8=C3),B1:B8,0))
    or

    manually entering "letter" for condition...

    =SUM(IF(A1:A8={"B","E","H"},B1:B8,0))
    see sample file attached.

    adding numbers.xlsx
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  6. #6
    Registered User
    Join Date
    10-06-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Sumif, Vlookup, Index/Match Issue?

    awesome, thanks everyone, especially benishiryo

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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