+ Reply to Thread
Results 1 to 5 of 5

VLOOKUP specific value out of several

  1. #1
    Registered User
    Join Date
    12-16-2018
    Location
    St. Petersburg, Russia
    MS-Off Ver
    MS Office 2018
    Posts
    1

    Lightbulb VLOOKUP specific value out of several

    I need some help with the VLOOKUP function. Say, there is a spreadsheet with history of production material supply/consumption.

    Each row indicates the date, the type of material, supplied/consumed quantity and total quantity after the supply/consumption. The problem I have is with the total quantity column. I need to add the change in the quantity to the most recent value. At first I tried using VLOOKUP with Type of Material used as a lookup_value. Obviously, this did not work, as there are several values, and the function returned the first one out of them, while I need the last.

    Then I tried combining IF, IFNA and VLOOKUP functions. First VLOOKUP checks the row above, and if there is no value (N/A), then the range for VLOOKUP increases. However, there is still a problem with this. The checked ranged is restricted by the amount of times I manually use IF/VLOOKUP combination, but the amount of rows (supply/consumption dates) increases infinitely with time. Is it possible to somehow make VLOOKUP range increase by 1 with each new row?

    Or are there any other ways to solve the problem? Perhaps a way for VLOOKUP to return the last value instead of the first?

    Thanks a lot in advance!
    Last edited by Krotishka1; 12-16-2018 at 09:48 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: VLOOKUP specific value out of several

    Welcome to the forum!

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    06-21-2017
    Location
    Missouri, USA
    MS-Off Ver
    2007 through 2019
    Posts
    71

    Re: VLOOKUP specific value out of several

    I think a Sumif would work. See attached workbook. Basically this adds all the supplied/consumed amounts together each time a new one is entered instead of looking at the last remaining qty.
    Attached Files Attached Files
    Last edited by SjMaxwell; 12-16-2018 at 10:32 AM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: VLOOKUP specific value out of several

    SJ Maxwell - just as it would be good to see the OP's workbook, so it would be helpful of you to attach your sample solution as a workbook as well as outlining it in the thread. Thanks.

  5. #5
    Registered User
    Join Date
    06-21-2017
    Location
    Missouri, USA
    MS-Off Ver
    2007 through 2019
    Posts
    71

    Re: VLOOKUP specific value out of several

    Will do, sorry about that.

+ 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] Vlookup to return specific value if cell value of vlookup is specific
    By shaz0503 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-24-2015, 10:36 PM
  2. [SOLVED] Vlookup on two specific criteria
    By jhalsall80 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-10-2014, 07:28 AM
  3. Vlookup a value and sum specific values in the same row
    By siroco79 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-12-2013, 12:59 PM
  4. [SOLVED] Vlookup in UserForm - Get Input from listbox, Lookup in specific table from specific sheet
    By s2jrchoi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2013, 09:00 AM
  5. [SOLVED] VLOOKUP containing specific texts
    By JakeMann in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-25-2013, 11:48 AM
  6. [SOLVED] multiple value for one specific value using vlookup
    By Imran368 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-26-2012, 02:13 PM
  7. Excel 2007 : vlookup to specific range
    By scambug in forum Excel General
    Replies: 9
    Last Post: 02-16-2012, 02:38 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