+ Reply to Thread
Results 1 to 3 of 3

copying a row of data to another worksheet based on specific variable in one column

Hybrid View

  1. #1
    Registered User
    Join Date
    02-25-2008
    Posts
    2

    Red face copying a row of data to another worksheet based on specific variable in one column

    Hi all,

    New to the forum, so direct me in the right spot if i'm off target.

    I am wanting to copy a whole row of data from one sheet to another when a specific value is entered into a particular column. I have set this up with an advanced filter which seems to work fine however when i recorded the macro so I could update the sheets when I changed data in the specified column i found that for the macro to run accurately I had to delete all the information on the sheet. How can I get the data to automatically update (copy to the other sheet) when specified data is entered

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Quote Originally Posted by njohnsto
    Hi all,

    New to the forum, so direct me in the right spot if i'm off target.

    I am wanting to copy a whole row of data from one sheet to another when a specific value is entered into a particular column. I have set this up with an advanced filter which seems to work fine however when i recorded the macro so I could update the sheets when I changed data in the specified column i found that for the macro to run accurately I had to delete all the information on the sheet. How can I get the data to automatically update (copy to the other sheet) when specified data is entered
    It's a little difficult to tell why from the description. Could you post the macro code you're using please?

    Also, are you wanting this macro to run automatically when data in the specific column is changed, or is it something which you will run from the menu or clicking an object to which the macro is attached?

  3. #3
    Registered User
    Join Date
    02-25-2008
    Posts
    2

    Smile sorry

    So this is the macro:

    Sub updatestat()
    '
    ' updatestat Macro
    '

    '
    Columns("A:O").Select
    Selection.Delete Shift:=xlToLeft
    Range("G11").Select
    Sheets("Database").Columns("A:J").AdvancedFilter Action:=xlFilterCopy, _
    CriteriaRange:=Sheets("Database").Range("K5:K6"), CopyToRange:=Range("A1") _
    , Unique:=False
    End Sub


    I do actually want the information to update automatically when information that meets the criteria range is either entered or deleted but as yet I haven't tried to do this.

    Thanks for the help

+ Reply to Thread

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