Results 1 to 5 of 5

VBA: copy by address filtered selection of cells

Threaded View

  1. #1
    Registered User
    Join Date
    12-16-2011
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    3

    VBA: copy by address filtered selection of cells

    hi
    I am trying to copy a group of cells (a selection)from one sheet ("SOURCE")
    to another ("DEST"). Before I copy I am doing a filter (using AutoFilter)for that cells, so only rows start with column "YES" will be copied.


    Sub Build()

    Application.ScreenUpdating = False

    Worksheets("SOURCE").Activate

    [SOURCE!B3:D6].AutoFilter Field:=1, Criteria1:="YES"

    ' copy by value
    '[SOURCE!B3:D6].Copy Sheets("DEST").[A1]

    ' copy by address
    Range("SOURCE!B3:D6").Select
    [DEST!A1:C4].Formula = "=SOURCE!" & ActiveCell.Address(0, 0)

    [SOURCE!B3:D6].AutoFilter

    Application.ScreenUpdating = True

    End Sub

    If I copy the cells by value (using copy method) it's OK - the filter works.
    But I want to copy the cells by reference (address) so change in the SOURCE
    will affect the cell in the DEST. Here the filter is ignored. What can I do
    to copy cells by reference and still using the filter? ?
    Tnx
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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