Results 1 to 6 of 6

Running a Macro that pulls data from a different file

Threaded View

  1. #1
    Registered User
    Join Date
    10-29-2018
    Location
    London
    MS-Off Ver
    2010
    Posts
    3

    Running a Macro that pulls data from a different file

    Hello!

    I have a very large file, a master file if you will, which includes a lot of data, and is updated regularly. I would like to create a separate file which pulls details from this large file to consistently provide a filtered list of this data which is easier to view, and can allow me to put more detailed data on it as well.

    See attached a condensed mock version of my master file, called 'Master File'.

    So, in the new file (let's say it will be called 'Gold Members'), I'd like to have a list of just 'Gold' member types which includes all the other data from the master file. Ideally, I'd like this file to update from Master File without having to open Master File.

    I've got the following code which puts it into a different sheet in the Master File (which sadly isn't useful for what I need):

    Sub Test()
    
    Dim Cell As Range
    
    With Sheets(1)
        ' loop column D until last cell with value (not entire column)
        For Each Cell In .Range("D3:D" & .Cells(.Rows.Count, "D").Row)
            If Cell.Value = "Gold" Then
                 ' Copy>>Paste in 1-line (no need to use Select)
                .Rows(Cell.Row).Copy Destination:=Sheets(2).Rows(Cell.Row)
            End If
        Next Cell
    End With
    
    End Sub
    Aside from this being in the same file, the other problem I have is any rows with non-Gold members are copied as blanks. Ideally I'd like it to just copy Gold members and have no blanks between them

    Both files will be saved in the same folder / location.

    Is anyone able to help me with creating a new code to get this done?
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 11
    Last Post: 02-23-2015, 08:17 PM
  2. Master Spreadsheet Pulls Variable File Name Data
    By thesonofdarwin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-22-2014, 06:43 AM
  3. Speed up code that opens and pulls data from 30+ excel files and then closes file
    By chadwick140 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-06-2013, 09:58 AM
  4. Getting Essbase Data pulls to update a master file
    By pulary in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-18-2013, 09:17 PM
  5. Macro that pulls data from one spreadsheet to another
    By EOrlovskis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-07-2012, 02:03 AM
  6. Macro that pulls data like vlookup but for multiple instances
    By finance14 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2011, 10:53 PM
  7. Writing a macro that pulls data from a specific worksheet
    By fecurtis in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-14-2008, 05:21 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