+ Reply to Thread
Results 1 to 8 of 8

VBA macro for copying rows from specified sheets if value equals

  1. #1
    Registered User
    Join Date
    02-24-2017
    Location
    France
    MS-Off Ver
    2007
    Posts
    86

    VBA macro for copying rows from specified sheets if value equals

    Hi, I am trying to create a macro, which will go through specified sheets in my workbook and then copy entire rows to new sheet, if values in column P in each of those sheets are not blank. Any ideas how can I approach that? Many thanks.

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

    Re: VBA macro for copying rows from specified sheets if value equals

    Hi bizzarofen

    This has been tested and works...
    Please Login or Register  to view this content.
    Last edited by sintek; 04-27-2017 at 09:13 AM. Reason: Changed code to tested code
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    02-24-2017
    Location
    France
    MS-Off Ver
    2007
    Posts
    86

    Re: VBA macro for copying rows from specified sheets if value equals

    Thank you very much Sintek, that's basically what I've been trying to build. Is there just a way to copy entire rows as values?

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

    Re: VBA macro for copying rows from specified sheets if value equals

    Change this
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by sintek; 04-27-2017 at 09:15 AM.

  5. #5
    Registered User
    Join Date
    02-24-2017
    Location
    France
    MS-Off Ver
    2007
    Posts
    86

    Re: VBA macro for copying rows from specified sheets if value equals

    I am getting a run time error, that:" Select method of Range class failed ", when I change this line

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

    Re: VBA macro for copying rows from specified sheets if value equals

    Quote Originally Posted by bizzarofen View Post
    I am getting a run time error, that:" Select method of Range class failed ", when I change this line
    Please see edited code in Post2

  7. #7
    Registered User
    Join Date
    02-24-2017
    Location
    France
    MS-Off Ver
    2007
    Posts
    86

    Re: VBA macro for copying rows from specified sheets if value equals

    Thank you so much sintek, it works just flawlessly now.

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

    Re: VBA macro for copying rows from specified sheets if value equals

    Glad I could help...Please mark thread as solved and add to Reputation....[Click on star and ADD REPUTATION]

+ 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. Macro to delete entire rows if column d equals 2925-6 & abc
    By Triscia in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-14-2015, 07:50 AM
  2. Need help with copying rows, replicating sheets, naming sheets and assigning print area...
    By Navin Agrawal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-05-2014, 09:21 AM
  3. FRUSTRATED - Need Help Copying Rows to Other Sheets
    By ericaregister78 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-04-2013, 03:43 PM
  4. Replies: 0
    Last Post: 11-08-2012, 01:07 PM
  5. [SOLVED] Macro to Copy Entire Rows if Column Equals
    By Andrew.Trevayne in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2012, 09:46 PM
  6. Macro to Copy Rows if cell value equals
    By oakleyfoy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-12-2011, 04:52 PM
  7. Macro for copying columns, rows, creating sheets, by criteria
    By JCOENG in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-08-2010, 02:04 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