+ Reply to Thread
Results 1 to 6 of 6

Vba assistance to copy specific row with criteria to another sheet

  1. #1
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

    Vba assistance to copy specific row with criteria to another sheet

    Hey There

    I have the below code which is supposed to copy over only a specific row that matches certain criteria to another sheet...Can't get it to work....
    I have attached a sample file. Would appreciate some insight....

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Vba assistance to copy specific row with criteria to another sheet

    1. If you're deleting rows as you go, you need to start at the bottom and loop up. TR to 1 Step -1.
    2. i is the variable being incremented, not TR.
    3. 2 should be replaced by the variable i
    4. You need to reset HR within the loop, not just before you start.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

    Re: Vba assistance to copy specific row with criteria to another sheet

    Hi TMS

    thank you for your valuable input. I found and tweaked this code which works...Only problem is, i can't get the first row of the Table to be populated. Always populates below that row.
    Please Login or Register  to view this content.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

    Re: Vba assistance to copy specific row with criteria to another sheet

    Nope, not working...No loop available.

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

    Re: Vba assistance to copy specific row with criteria to another sheet

    This is sooooo confusing

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

    Re: Vba assistance to copy specific row with criteria to another sheet

    K, so this works. Less confusing than my original code.

    Please Login or Register  to view this content.

+ 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. [SOLVED] Copy and paste specific cell to another sheet based on multiple criteria
    By impresxy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-09-2015, 07:11 AM
  2. [SOLVED] Copy entire row based on 2 criteria and paste on the next blank row on a specific sheet
    By ALNER in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-25-2014, 11:23 PM
  3. Replies: 0
    Last Post: 07-16-2013, 05:22 AM
  4. HELP! Macro to Copy specific cells from one sheet to another based on specific criteria
    By atriscritti in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-11-2012, 11:05 AM
  5. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 AM
  6. Macro to search sheet for certain criteria and copy specific data to cell
    By ThaGonz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-02-2012, 12:34 PM
  7. Copy specific data from one sheet to another sheet if certain criteria
    By jscorsone in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-13-2010, 02:11 PM

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