+ Reply to Thread
Results 1 to 4 of 4

Copy unique databodyrange from table1 to table2

  1. #1
    Registered User
    Join Date
    04-24-2020
    Location
    USA
    MS-Off Ver
    WA
    Posts
    64

    Copy unique databodyrange from table1 to table2

    Hi everyone!

    I am trying to copy values of column A, F, G, H if the criteria in G is met "Exceeded". And delete the entire row in table1.

    Thank YOU!

    Sheet1(is also a table)
    Row A4 to H4 is header
    move region, total, status and year -> sheet2
    delete those values that meet the criteria from sheet1

    Sheet2 (formatted into a table)
    Row A1 to D1 is header (Region, Total, Status, Year)

    This is the code that I was trying to modify

    Please Login or Register  to view this content.
    Here is what I came up with, debug, and line 8, 9, 10, 11 are getting an error: subscript out of range (error 9). I am trying to copy row A5, F5, G5, H5 to table2 in sheet2, and then delete the entire row (whatever row(s) that met the criteria "Exceeded" delete A, B, C, D, E, F, G, H rows) from sheet1(table1). But only copy A, F, G, H columns if the criteria was met.



    Please Login or Register  to view this content.
    Attached Images Attached Images
    Last edited by sniper1; 06-05-2020 at 09:16 AM. Reason: Corrections to second code

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Copy unique databodyrange from table1 to table2

    Possibly...
    Please Login or Register  to view this content.
    Last edited by dangelor; 06-05-2020 at 01:35 PM. Reason: added delete

  3. #3
    Registered User
    Join Date
    04-24-2020
    Location
    USA
    MS-Off Ver
    WA
    Posts
    64

    Re: Copy unique databodyrange from table1 to table2

    dangelor,

    This works out well. Thank you very much!

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Copy unique databodyrange from table1 to table2

    Glad to help! Thank you for the rep points!

+ 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 a range of info from Sheet1 to a different range on Sheet2
    By mgolda87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-17-2015, 09:45 PM
  2. Copy a range of info from Sheet1 to a different range on Sheet2
    By mgolda87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2015, 09:45 PM
  3. Unique values in listbox in sheet2 from sheet1
    By santbiju1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2015, 10:36 AM
  4. Replies: 5
    Last Post: 09-29-2014, 11:08 AM
  5. [SOLVED] Macro to compare Sheet2 values with Sheet1 cells range (combined with Name Manager)
    By Manish_Gupta in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-17-2014, 08:26 AM
  6. Replies: 4
    Last Post: 03-17-2013, 05:58 AM
  7. loops to index hyperlinks from one sheet1.range to sheet2.range
    By shaukat in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-09-2011, 05:37 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