+ Reply to Thread
Results 1 to 7 of 7

Lookup value in a range and add all corresponding cells

  1. #1
    Registered User
    Join Date
    08-13-2013
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2013
    Posts
    58

    Lookup value in a range and add all corresponding cells

    Trying to create a formula that looks up a persons name from a ledger and return's all the transactions that person has and totals them.

    So in the example below, I want to know everything that has been paid out to John:

    Excel 1.PNG

    Thanks for your help!

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Lookup value in a range and add all corresponding cells

    =SUMIF(A2:A10,"=John",C2:C10)

  3. #3
    Forum Contributor
    Join Date
    07-30-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    121

    Re: Lookup value in a range and add all corresponding cells

    Removed due to previous reply
    Last edited by AYData; 08-20-2013 at 10:15 AM. Reason: Previous reply to mine.

  4. #4
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Lookup value in a range and add all corresponding cells

    in cell f4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    but you will have to remove the "?" after john.

    Are you familiar with pivot tables? That might do exactly what you are looking for. Also, for future reference it is better to post a sample data set vs a photo.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  5. #5
    Registered User
    Join Date
    08-13-2013
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2013
    Posts
    58

    Re: Lookup value in a range and add all corresponding cells

    Thanks guys, that worked! I'm trying to create a macro that pulls the balance from this ledger onto another ledger. I don't know about making this ledger into a pivot table first and then pulling the data with a vlookup? I've never pulled data out of a pivot table.

  6. #6
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Lookup value in a range and add all corresponding cells

    As a macro you would need something more like:
    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Lookup value in a range and add all corresponding cells

    Why bother with a macro if you can use excel functions to do it instead (which makes it much easier to audit IMO)?

    It is very easy to use a pivot table to aggregate data then use vlookups to summarize on another sheet, if you need the pivot table to aggregate. You could also just use thje pivot table AS the dashboard or summary sheet OR you could use the sumif formula in the summary sheet.

+ 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. Specifying a range of cells as lookup value?
    By ChrisBaum in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-19-2013, 06:58 PM
  2. Excel lookup for a range of cells
    By shevfa in forum Excel General
    Replies: 2
    Last Post: 11-06-2007, 12:36 AM
  3. [SOLVED] lookup and return range of cells
    By ark in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  4. lookup and return range of cells
    By ark in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  5. lookup and return range of cells
    By ark in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 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