+ Reply to Thread
Results 1 to 6 of 6

VLOOKUP and SUM together

  1. #1
    Registered User
    Join Date
    09-22-2015
    Location
    Durham,England
    MS-Off Ver
    MS Office 2013
    Posts
    8

    Question VLOOKUP and SUM together

    Hi all,

    This is probably a really simple fix but would be great if someone could explain where I've gone wrong.

    I'm having problems with VLOOKUP - I think it's doing the right thing here (i.e looking at the right data) but it isn't counting all the data with 'Bill & Ben' as a reference it just gives me either 1 or 3 as an answer instead of 9 that the answer should be. See manually put in data for the exact.

    Book2.xlsx

    Please can someone fix this minor problem for me?

    Ben

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: VLOOKUP and SUM together

    Hi Ben,

    VLOOKUP will find the first instance of Bill & Ben and return the corresponding value.

    If you want the result to be 9 (i.e. the sum of column AF for all Bill & Ben rows) then try the below formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BSB

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,628

    Re: VLOOKUP and SUM together

    How about SUMIF? (Vlookup is not a good function here - it returns just one value):
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  4. #4
    Registered User
    Join Date
    09-22-2015
    Location
    Durham,England
    MS-Off Ver
    MS Office 2013
    Posts
    8

    Re: VLOOKUP and SUM together

    Thanks BSB,

    That works exactly how I needed it to, there was me thinking I needed VLOOKUP.

    Solved some major problems there.

    Ben

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: VLOOKUP and SUM together

    Happy to help mate.

    Don't forget to mark the thread as SOLVED if you're happy you have your solution.

    BSB

  6. #6
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: VLOOKUP and SUM together

    There are a couple fundamental errors going on in this spreadsheet.

    1) The data on the "Score Sheet" is set up like an old-timey scorecard from the pre-computer days; as a rule, never use merged cells with any sort of math or lookup operation, and avoid "spacer" rows if at all possible.

    So my first response is, rebuild your data table layout so that it's more cooperative.

    2) VLOOKUP finds the first match, not all the matches. That's how it's designed, it can't really do what you're asking for, without some kind of ugly array-function hacks. You fundamentally want to run a function that adds up all the values based on a criteria.

    Fortunately those exist directly, to wit:
    Please Login or Register  to view this content.
    You can copy/paste that in all the cells in the C7:D13 area and it will deliver the same result as the Manual Analysis tab.

    But after that, I think you're going to run into some pretty troublesome hassles for getting data for each Player, for example.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

+ 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. Replies: 3
    Last Post: 12-04-2014, 01:27 PM
  2. Using vLookup based on results from a vLookup & returning an undetermined list
    By NormalityBan in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-14-2014, 05:02 AM
  3. Replies: 0
    Last Post: 12-26-2013, 01:12 PM
  4. Display Cell within VLookup range that excel thinks matches the VLookup Value
    By headachexcelperson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2013, 04:56 PM
  5. [SOLVED] Vlookup is not working and giving =vlookup(B2,$T$2:$U$135,2,false) this kind of values.
    By yogeshsharma1981 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2013, 04:08 PM
  6. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  7. Replies: 5
    Last Post: 07-29-2009, 07:53 AM

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