+ Reply to Thread
Results 1 to 7 of 7

Copying a portion of a row based on cell criteria to another sheet

  1. #1
    Registered User
    Join Date
    08-19-2015
    Location
    Anywhere
    MS-Off Ver
    Office 2007
    Posts
    7

    Copying a portion of a row based on cell criteria to another sheet

    Hello!

    So I'm a newb at VBA programming, and I've been breaking my head over this code for some time now.

    Originally, I'd gotten it to the point where it did copy just a portion of the row to the other sheet, but I forgot to save that copy of the code before I messed with it more and now it won't even do that.

    So I have a column (M) that has a drop-down list with five conditions: Active, Pending, Completed, Early Termination and Disqualified.

    I need excel, the second I press save, to scan the entire "M" column and find the cells with "Completed," "Early Termination," or "Disqualified" to copy the corresponding row from columns "A" to "J" and paste it in the corresponding sheets(same names as the categories) in the same workbook in the next open row. Then that row in the source sheet needs to be deleted.

    This is what I have so far:
    Please Login or Register  to view this content.
    Thank you in advance!
    Last edited by 6StringJazzer; 08-20-2015 at 03:42 PM.

  2. #2
    Registered User
    Join Date
    08-01-2012
    Location
    Montreal, Qc, Canada
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Copying a portion of a row based on cell criteria to another sheet

    Hi, Im going to take a stab at this, but i changed up your code... (sorry not a guru)

    please let me know if it works or if there are any issues

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-19-2015
    Location
    Anywhere
    MS-Off Ver
    Office 2007
    Posts
    7

    Re: Copying a portion of a row based on cell criteria to another sheet

    When I compile into VBA Project, it highlights the Set Status line and gives me an alert saying Object required. :/

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Copying a portion of a row based on cell criteria to another sheet

    lucky.vjn

    Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Copying a portion of a row based on cell criteria to another sheet

    Remove "Set" from that line of code. Also, I see no reason for Status to be Variant, and recommend it be String.

  6. #6
    Registered User
    Join Date
    08-19-2015
    Location
    Anywhere
    MS-Off Ver
    Office 2007
    Posts
    7
    Quote Originally Posted by 6StringJazzer View Post
    lucky.vjn

    Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer

    Sorry about that! Will definitely keep that in mind next time

  7. #7
    Registered User
    Join Date
    08-19-2015
    Location
    Anywhere
    MS-Off Ver
    Office 2007
    Posts
    7

    Re: Copying a portion of a row based on cell criteria to another sheet

    I did both recommended things, but nothing is happening when I run the code after compiling and saving.

+ 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] Copying Cells from one sheet to another based on specific criteria
    By james.heston in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-30-2013, 09:51 AM
  2. Copying a row of data to another sheet based on criteria in first sheet
    By Carl Mukluk in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 02-19-2013, 08:01 AM
  3. Replies: 4
    Last Post: 01-08-2013, 12:37 PM
  4. Copying just a portion of a cell
    By kharter in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2012, 08:12 PM
  5. Replies: 2
    Last Post: 07-25-2012, 08:11 AM
  6. Copying rows in one sheet to another sheet based on defined criteria
    By arvin_tx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2012, 10:49 AM
  7. Searching for Text String and copying specific portion based on characters
    By undergraduate in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-30-2010, 12:45 PM
  8. Copying line from one sheet to another based on given criteria
    By Valerie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-02-2006, 06:05 PM

Tags for this Thread

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