+ Reply to Thread
Results 1 to 6 of 6

IF Column A=x copy from column B to G in another Worksheet

Hybrid View

  1. #1
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: IF Column A=x copy from column B to G in another Worksheet

    Try:

    Sub Copy_Data()
    Dim ws1 As Worksheet:   Set ws1 = Sheets("Input Sheet")
    Dim ws2 As Worksheet:   Set ws2 = Sheets("Output Sheet")
    Dim x As String
    Dim rCell As Range
    
    x = "FILL"
    
    For Each rCell In ws1.Range("A1:A" & ws1.Range("A" & Rows.Count).End(xlUp).Row)
        If rCell.Value = x Then
            ws1.Range("B" & rCell.Row, "G" & rCell.Row).Copy Destination:=ws2.Range("A" & Rows.Count).End(xlUp).Offset(1)
        End If
    Next rCell
    
    End Sub

  2. #2
    Registered User
    Join Date
    06-09-2014
    Posts
    4

    Re: IF Column A=x copy from column B to G in another Worksheet

    Worked. Thank you stnkynts

+ 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. Copy & Paste Column with Data in the next available column in the same worksheet
    By BruceBane73 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2013, 12:07 AM
  2. [SOLVED] Macro - will only copy to Column K but need it to go to Column P into a new worksheet
    By jpsprack in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-05-2012, 08:34 PM
  3. conditional copy of column to another column of same worksheet
    By sanjay19961 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-21-2010, 06:54 AM
  4. [SOLVED] Copy column A and column D from all sheets into new worksheet
    By al007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2006, 06:55 AM
  5. Copy column B and column E from all sheets into new worksheet
    By al007 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2006, 03:40 AM

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