+ Reply to Thread
Results 1 to 3 of 3

Thread: How to grab visible cells only from one workbook to another.

  1. #1
    Registered User
    Join Date
    08-22-2011
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    How to grab visible cells only from one workbook to another.

    I have two workbooks that reference one another in which the cells are equal to each other.

    These are the workbook names:
    Baseline.xls
    Database.xls

    If I use the filter on the Baseline workbook, it still automatically fills the Database workbook with all of the cells. I would like for the Database workbook to only grab the visible cells from the Baseline workbook when I filter the Baseline. Is this possible?

    Here is the code I am working with:

    
    Sub FillDate()
           Windows("Baseline.xls").Activate
           Dim Rng As Long, Rng1 As Range
           Rng = Sheets("Current").Range("BJ" & Rows.Count).End(xlUp).Row
    
           Windows("Database.xls").Activate
           Range("A4").FormulaR1C1 = "='[Baseline.xls]Current'!R[7]C[61]"
    
           With Sheets("Replacement")
                   .Range("A4:A" & Rng).FillDown
           End With
    
           End Sub

  2. #2
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,640

    Re: How to grab visible cells only from one workbook to another.

    Yor code is simply adding formulas to the sheet that read the data. You could use code to copy the filtered data in one go to the target workbook
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  3. #3
    Registered User
    Join Date
    08-22-2011
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to grab visible cells only from one workbook to another.

    I don't want to use a copy and paste method because the data may change and if the cells are equal then that allows the data to change on the Database workbook as well.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0