+ Reply to Thread
Results 1 to 2 of 2

VBA VLOOKUP with loop using a locked for editing file for data

  1. #1
    Registered User
    Join Date
    10-17-2014
    Location
    Plymouth, ma
    MS-Off Ver
    2010
    Posts
    30

    VBA VLOOKUP with loop using a locked for editing file for data

    I have attached a file that has partial code in the VBA editor

    I want to loop thru Cells A17 thru A34 and return the V lookup results in cells H17 thru H34

    The code in the worksheet is returning the value for H17 correctly, I just need to complete the loop

    When the data file workbook is open I get a message that says the file is locked for editing. I think this may be causing issues when I try and run the code

    Thanks


    Steve

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,925

    Re: VBA VLOOKUP with loop using a locked for editing file for data

    Is the sole purpose of the VB code to duplicate the VLOOOKUP formula form row 17 down as many rows as you have? If so, then investigate converting the range of data into an Excel Table. When you copy and paste data into a spreadsheet, one of the things a table does is copies the formula down automatically for you. Here's a link to an introduction to tables: http://www.utteraccess.com/wiki/inde...ables_in_Excel

    In this case, you'll have to do a bit of work on the headers. You have the headers in two rows. You will have to combine them into one row. With wrap, they should still look the same on the spreadsheet. Then highlight the table area (first row and column of header and data to last row and column of data) and click on Format as Table.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. Replies: 0
    Last Post: 09-06-2013, 05:31 AM
  2. Excel File is Locked for Editing
    By Vladamir in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-05-2013, 01:59 PM
  3. File is locked for Editing
    By retiredjhawk in forum Excel General
    Replies: 1
    Last Post: 08-23-2011, 02:24 AM
  4. File in use.. locked for editing
    By freekrill in forum Excel General
    Replies: 0
    Last Post: 12-01-2010, 06:55 PM
  5. Excel file locked for editing
    By derik in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-03-2008, 02:16 PM
  6. [SOLVED] Shared File/Locked for Editing
    By swedbera in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2005, 09:05 AM
  7. [SOLVED] File Locked for editing--not
    By mike montagne in forum Excel General
    Replies: 1
    Last Post: 07-13-2005, 10:05 PM
  8. File in use NOT locked for editing...
    By Mathieu Paquette in forum Excel General
    Replies: 0
    Last Post: 04-19-2005, 10:06 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