+ Reply to Thread
Results 1 to 5 of 5

vlookup for multiple rows and saving new row

  1. #1
    Registered User
    Join Date
    02-21-2022
    Location
    sydney
    MS-Off Ver
    10
    Posts
    2

    vlookup for multiple rows and saving new row

    Hello,

    I am hoping someone here may be able to help me.

    I am making a spreadsheet that tracks and logs the location and bookings for work equipment.

    Problem 1.

    I'd like to make a function that will allow team members to "book in" equipment on a single row and save that data. Then, when someone selects that equipment in a drop down menu it will bring up multiple rows of "bookings" for that piece of equipment. Then, if another row of data is added - being a new booking - this can then be saved and it will show up the next time someone selects that piece of equipment for booking.

    I'm not sure if it would be easier to have these functions on two different tabs in the spreadsheet. I know vlookup can be used but can it grab many rows of data attached to a single piece of equipment?

    Thanks

  2. #2
    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
    52,933

    Re: vlookup for multiple rows and saving new row

    Hi, welcome to the forum

    VLOOKUP will only return the 1 matching criteria it finds - then stop looking.

    You probably need an INDEX/SMALL/IF() array formula for this, but to get a better answer, please provide a SMALL clean sample WB showing what you have and what you want.
    (see yellow banner at the top for instructions)
    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

  3. #3
    Registered User
    Join Date
    02-21-2022
    Location
    sydney
    MS-Off Ver
    10
    Posts
    2

    Re: vlookup for multiple rows and saving new row

    Hello,

    Thanks for your assistance. I think I have a better way.

    I am using Microsoft Office home and business 2019 on a PC and my excel is version 2201.

    I want to create a button that can copy a row of data (that has some dropdown menu cells) into another tab as basic text.

    Then go on to the next line with an offset function.

    I'm having some trouble naming the sheets in the macro editor.

    This is the script i've been using but i get stopped in the following line. The name of the tab is "In Situ" but the debugger doesn't like it.
    Set copySheet = Worksheets("In Situ")


    Here is the script


    Please Login or Register  to view this content.
    Last edited by deh419; 02-22-2022 at 05:53 PM. Reason: editing for clarity of assistance

  4. #4
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: vlookup for multiple rows and saving new row

    If you provide a working file, even if it has bogus information, we can provide appropriate direction. See the yellow banner above for instructions. What I would suggest is to create a sheet that is filtered with an autofilter based on the drop down value.

  5. #5
    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,830

    Re: vlookup for multiple rows and saving new row

    Administrative Note:

    Welcome to the forum.

    Members will tailor the solutions they offer to the version (NOT release number) of Office (Excel) that you have. 10 is Windows, not Office. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.

    Administrative Note:

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are new here, I have done it for you this time.)
    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.

+ 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] SUM from VLOOKUP result multiple rows multiple columns
    By BrianOfNazareth in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-30-2021, 12:10 AM
  2. [SOLVED] Vlookup and multiple rows
    By nostrum in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-05-2014, 05:13 PM
  3. [SOLVED] Saving worksheet using a macro. Problem is that it is saving more rows than it needs to
    By Kammphoto in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-04-2013, 10:09 AM
  4. Multiple Row Match (VLOOKUP Extended) to find Multiple Rows
    By Niper in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-24-2011, 10:58 AM
  5. Multiple ccolums/rows to get data from multiple columns/rows (vlookup)
    By Ramzes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-18-2010, 05:35 AM
  6. macro for saving multiple rows of data to new sheet
    By stephen1000 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-14-2009, 06:52 PM

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