+ Reply to Thread
Results 1 to 10 of 10

Lookup and add the value of the column next to it to the sum

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-22-2013
    Location
    US
    MS-Off Ver
    Mac Version 2011
    Posts
    126

    Lookup and add the value of the column next to it to the sum

    Hi guys,

    I am trying to find value for a particular date and then sum this value with the value from the column next to it.

    I can use hlookup to get the first value but don't know how to include the value of the next column to it.

    Please help. Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Lookup and add the value of the column next to it to the sum

    Try:
    =SUM(OFFSET($A$2,0,MATCH(E2,$A$1:$B$1,0)-2,1,2))
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Lookup and add the value of the column next to it to the sum

    What is the basis of finding the next column to add? Perhaps sumifs() might help?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    08-22-2013
    Location
    US
    MS-Off Ver
    Mac Version 2011
    Posts
    126

    Re: Lookup and add the value of the column next to it to the sum

    Pauleyb, your formula works, but assuming I have a large set of data, I can't go to each one to choose the cell like you did. I don't know what date it will be to choose A2 like you did. It will not always be a2.

  5. #5
    Forum Contributor
    Join Date
    08-22-2013
    Location
    US
    MS-Off Ver
    Mac Version 2011
    Posts
    126

    Re: Lookup and add the value of the column next to it to the sum

    The example I sent was not good, so I remade it. Hopefully it will help clarify it a bit more.

    Thanks guys!
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    08-22-2013
    Location
    US
    MS-Off Ver
    Mac Version 2011
    Posts
    126

    Re: Lookup and add the value of the column next to it to the sum

    The basis is that I have a date and a range of dates with values. I want to find the value of a particular date and sum it with the value of the next columns to get the total spending. Is that clear enough?

  7. #7
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Lookup and add the value of the column next to it to the sum

    I think my formula was still essentially correct. I just had to expand it for your new dates and change the reference point. Put this in I7 and then drag down to I8
    =SUM(OFFSET($A$2,0,MATCH(H7,$A$1:$E$1,0)-2,1,2))

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Lookup and add the value of the column next to it to the sum

    You didnt specify which side, but it looks like the cell to the left? TRy this....
    =INDEX($A2:$E2,MATCH($H$7,$A$1:$E$1,0))+INDEX($A2:$E2,MATCH($H$7,$A$1:$E$1,0)-1)
    If yoy want it to take the cell on the right, chanfge it to this...
    =INDEX($A2:$E2,MATCH($H$7,$A$1:$E$1,0))+INDEX($A2:$E2,MATCH($H$7,$A$1:$E$1,0)+1)

  9. #9
    Forum Contributor
    Join Date
    08-22-2013
    Location
    US
    MS-Off Ver
    Mac Version 2011
    Posts
    126

    Re: Lookup and add the value of the column next to it to the sum

    Hey pauleyb,

    Thanks! It works! Perfect man! Appreciate it very much!

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Lookup and add the value of the column next to it to the sum

    Happy to help and thanks for the feedback

+ 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. [SOLVED] Lookup in 2nd column of a lookup table
    By Thistledown in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-27-2012, 05:44 AM
  2. [SOLVED] Lookup and Match Column A with Column B and return Value from Column C
    By Mikeytres in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-28-2012, 12:19 PM
  3. [SOLVED] another lookup- lookup column against row inputs
    By opeyemi1 in forum Excel General
    Replies: 2
    Last Post: 05-02-2012, 07:39 PM
  4. Replies: 5
    Last Post: 02-24-2011, 11:26 AM
  5. Lookup adjacent column to multiple lookup columns.
    By JAMES4228 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-13-2009, 03:19 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