+ Reply to Thread
Results 1 to 5 of 5

Macro to Copy Entire Rows if Column Equals

  1. #1
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Macro to Copy Entire Rows if Column Equals

    Hi,
    Sorry to be back again asking for help (I hope you guys don't get tired of me).
    I thought this one is a bit complicated.
    The dummy spreadsheet (See attached), contains data from Column V to Column AM.
    I would like to copy the entire row if the value on Column AI is equal to "ABC".
    The Rows needs to be copied on Column A to Column R.
    This is just a part of the Macro that I am trying to build but got stucked with this part.
    Appreciate any help. Thank you in advance.

    Regards,
    Andrew
    Attached Files Attached Files
    Last edited by Andrew.Trevayne; 06-21-2012 at 09:46 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to Copy Entire Rows if Column Equals

    Andrew,

    We will never get tired of you .

    Try this code
    Please Login or Register  to view this content.
    Put it in a standard module.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Re: Macro to Copy Entire Rows if Column Equals

    Thank you so much Arelette! It worked great!
    If I have another condition perhaps if Column AH = "888888" to further trim the results, can that be done too?

    My condition will now be AI = "ABC" and AH = "888888".

    Thanks again, appreciate it very much.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to Copy Entire Rows if Column Equals

    So should a row be copied only if both conditions are met? In that case change this line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    else if any 1 condition should be met for a single row then change it to
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Re: Macro to Copy Entire Rows if Column Equals

    Great work Arlette! Thank you, thank you so much! ^^

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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