Results 1 to 3 of 3

Copy Row if Cell contains data within specifc range

Threaded View

  1. #1
    Registered User
    Join Date
    09-06-2018
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    24

    Copy Row if Cell contains data within specifc range

    Hi

    I'm currently using this code to search my sheet for the overall total column, and then copy this row onto the last row of the next sheet :

    Sub test()
    Dim LR As Long, i As Long
    With Sheets("Sheet1")
        LR = .Range("B" & Rows.Count).End(xlUp).Row
        For i = 1 To LR
            If .Range("B" & i).Value = "Overall Total:" Then .Rows(i).Copy Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
        Next i
        
    End With
    
    End Sub
    HOWEVER, this code copies the entire row and as a result, the table doesn't auto-populate. I need to edit the code so that it only copies between columns A:W as when I manually copy this over, the table and it's formulas do auto-populate.

    Thank you in advance.
    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. [SOLVED] Formula to copy and paste if referenced cell has specifc value
    By stpeter in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-03-2016, 01:13 PM
  2. [SOLVED] Copy Template Workbook and paste specifc range
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-29-2015, 03:57 PM
  3. [SOLVED] Color range if sum equal to specifc value
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-05-2015, 02:23 PM
  4. [SOLVED] Copy data with 4 cell interval and copy range of data like vlookup with structured output
    By Daydreams in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-23-2013, 04:08 AM
  5. Replies: 3
    Last Post: 03-26-2013, 06:06 PM
  6. formula to autopopulate a cell with specifc data from another
    By boltoncalling in forum Excel General
    Replies: 5
    Last Post: 01-11-2012, 12:55 PM
  7. ???Refer to a specifc cell in a named range
    By Jaylin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-10-2006, 07:50 AM

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