+ Reply to Thread
Results 1 to 3 of 3

Copy Selected Cells of Rows to another Worksheet Based on a Condition

  1. #1
    Registered User
    Join Date
    02-03-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    3

    Copy Selected Cells of Rows to another Worksheet Based on a Condition

    First off, thank you for what you do! I am self-taught (arguably by a pretty shoddy teacher), and am determined to figure *some* of this stuff out. I've come to this forum many many times to work through issues with great success. Thanks!

    I need a code to look at the rows on one worksheet and based on the value of column A for each row, copy cells A through E in that row to cells A through E of a blank row on a corresponding worksheet.

    I found a code from another post that does just what I need it to with one small exception. The code was posted by DaveGuggs and is as follows:

    Please Login or Register  to view this content.
    I have modified the code above to fit my workbook. It works great and is WAY simpler than the code I had clunked out. I need to make one small change- in the code where it copies and pastes the data to the new sheet, I would like to only copy the data in column A through E, not the entire row.

    I tried a bunch of things, for example, in this row of code

    Please Login or Register  to view this content.
    I put in

    Please Login or Register  to view this content.
    in place of

    Please Login or Register  to view this content.
    But it returned an error 13, type mismatch. What do I need to put in to only copy columns A through E of row I?

    I'm sure this has a simple fix, and I'm sure that my question exposes my lack of vba intellegence. ; )

    Thank you much!

    Al
    Last edited by Al53; 02-04-2010 at 10:36 PM.

  2. #2
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy Selected Cells of Rows to another Worksheet Based on a Condition

    Like so:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-03-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Copy Selected Cells of Rows to another Worksheet Based on a Condition

    Works like a charm! Thanks a bunch!

    Al

+ 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