+ Reply to Thread
Results 1 to 2 of 2

Macro for variable location data

  1. #1
    Registered User
    Join Date
    11-03-2016
    Location
    Cambridge
    MS-Off Ver
    2013
    Posts
    4

    Macro for variable location data

    So let’s see how can I explain this.

    I’m fairly new to VBA and macros, and I think I’m trying to do something complex for me at the moment.

    I have the data that I want in a .html file. If I open that with excel, all data appears in column A, but I’m only interested in the data regarding Banana’s spots. Because there is nothing that appears only once, I need to find “This is what I want” in that column, and I want to copy the next 18 rows from there and paste it in A4 (because I have a formula in other cells that use the data from the cells I’m pasting it into)

    The problem that I’m having is that I have 2 types of bananas, and they are in different folders, so it’s a variable location.

    So the 2 types are Banana and Banana+

    Banana data is in: \\folder\Quality\banana\v9.9\Completed then there is a folder per lot of banana (i.e. Lot 123) and inside that folder there is a results folder, and inside that folder is the Report.html

    The same goes for Banana+, the data is in: \\folder\Quality\banana+\v.2.1\Completed then the same as before, a folder per lot with a data folder, a results folder, and the Report.html inside.

    Hope everything make sense.

    This is where I got to so far

    Sheet is called “Fruit”
    lotnumber is in cell B1
    path is in cell F1 (that comes up after you select the banana type from a drop down)
    the path that I have written in that cell is
    \\folder\Quality\banana\v9.9\Completed
    \\folder\Quality\banana+\v2.1\Completed


    Please Login or Register  to view this content.

    I'm getting an error in the filename path

    Any ideas?

    Thanks a lot!

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Macro for variable location data

    What is the error youre getting and which line of code is highlighted when it debugs?

    Also can you post what exactly is shown in cell F1?
    If someone has helped you then please add to their Reputation

+ 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] Macro to save selected worksheets as workbooks in variable location
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-25-2015, 10:32 AM
  2. Macro to cut and paste a variable number of rows to a variable location?
    By TheClaw2323 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-03-2015, 07:57 AM
  3. Macro to insert a variable number of rows into a variable location
    By TheClaw2323 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-08-2015, 05:31 AM
  4. Saving macro created files in variable location.
    By richankur in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2015, 09:26 AM
  5. [SOLVED] Macro - Paste to ColumnCell Location Based on a Variable
    By hoops85 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-17-2014, 12:13 PM
  6. consolidate data from multiple files/worksheets when data in variable location
    By Aaron_Tram in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-21-2013, 12:49 PM
  7. Variable Data Location Lookup
    By Dulanic in forum Excel General
    Replies: 4
    Last Post: 10-27-2011, 01:00 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