+ Reply to Thread
Results 1 to 3 of 3

Can you use Sum and Vlookup to sum up a range between two cells?

  1. #1
    Registered User
    Join Date
    11-04-2021
    Location
    Somewhere
    MS-Off Ver
    365
    Posts
    1

    Question Can you use Sum and Vlookup to sum up a range between two cells?

    I have tried =SUM(Vlookup:Vlookup) but it does not really work with that logic. So maybe has some idea how I could solve this.

    I try to explain my problem.

    I have a row called "level" and for each level there are costs ("stone") for that special level.
    I wanted to write a =Sum function that lets me type in a level in a cell and then it sums up all the stone that is needed for that level. So as example. If I type in level 3 it should add up 10, 20 and 30.

    Here is an example how my excel looks like:

    Please Login or Register  to view this content.
    Does anyone know how to do this?

    I mean my emergency solution is to make another column and sum it up all so that I have "cost per level" and "cost total until level" but I wanted to try to solve it cleaner.

    This is the formula that I tried, but it only returns the sum of the 2 vlook up values, not everything inbetween

    =SUM(VLOOKUP(0;Metal!$B$25:$P$83;13;TRUE);VLOOKUP($B$1;Metal!$B$25:$P$83;13;TRUE))

    I basically want to sum up a range which constantly changes based on the level that I want to look up.
    Last edited by ZeroChill; 11-04-2021 at 02:17 PM.

  2. #2
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    21,161

    Re: Can you use Sum and Vlookup to sum up a range between two cells?

    A hint for good titles/questions: Don't start out with the solution, start out with the problem. VLOOKUP is barking up the wrong tree for this problem. VLOOKUP only returns a single value. INDEX returns the actual range, which is what you want.

    Also, please give us some clue to your location in your profile so we know what localization to apply. Your formula looks like a non-U.S. syntax, which is different from how formulas look to me.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Where V1 is value for the first level and V2 is the value for the second level.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365, rarely 2007
    Posts
    12,718

    Re: Can you use Sum and Vlookup to sum up a range between two cells?

    Or perhaps if you type in a value in D1 use this in D2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 11-04-2021 at 04:52 PM.
    Dave

+ 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. VBA to insert Vlookup to a range of cells
    By Biplab1985 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2018, 01:52 PM
  2. Replies: 2
    Last Post: 01-09-2018, 10:05 AM
  3. Replies: 1
    Last Post: 08-27-2014, 03:01 PM
  4. [SOLVED] vlookup if range of cells greater than 0
    By Marvlin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-04-2014, 01:59 AM
  5. Replies: 1
    Last Post: 09-04-2013, 07:23 AM
  6. VLookup based on range of cells
    By bitswit in forum Excel General
    Replies: 4
    Last Post: 02-09-2012, 05:28 AM
  7. SUM of Range of Cells determined by VLOOKUP
    By rennox2605 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-20-2010, 12:33 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