+ Reply to Thread
Results 1 to 6 of 6

VBA Macro to copy cells over to another sheet based on the value of a cell

  1. #1
    Registered User
    Join Date
    02-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    22

    VBA Macro to copy cells over to another sheet based on the value of a cell

    Hi,

    I'm trying to copy over a set of cells based on the content of cell. It not working for me and the macro stops at the If statement. Any thoughts? code below.

    Thanks in advance,
    +HZ


    Please Login or Register  to view this content.
    Last edited by hani9041; 03-12-2012 at 08:34 AM. Reason: Issue was resolved

  2. #2
    Forum Contributor
    Join Date
    02-07-2012
    Location
    MIA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    429

    Re: VBA Macro to copy cells over to another sheet based on the value of a cell

    The property value can't be applied to the type cells. You need to do it with range instead. Try:

    Please Login or Register  to view this content.
    I hope that helps.

  3. #3
    Registered User
    Join Date
    02-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: VBA Macro to copy cells over to another sheet based on the value of a cell

    I had tried it with range but it didn't work either. It still breaks on the If statement.

  4. #4
    Registered User
    Join Date
    02-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: VBA Macro to copy cells over to another sheet based on the value of a cell

    For some reason the following statement is giving me problems:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: VBA Macro to copy cells over to another sheet based on the value of a cell

    Okay I think I got it. You can't just pass in cells, you also need to pass in the address to the cell here is my latest code.


    Please Login or Register  to view this content.
    But I can't get it to past to the new sheet.

    +hz
    Last edited by hani9041; 03-01-2012 at 03:06 PM. Reason: removing comments from code

  6. #6
    Registered User
    Join Date
    02-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: VBA Macro to copy cells over to another sheet based on the value of a cell

    I'm making progress on this but I'm not sure if I'm copying and pasting correctly. Please take a look and help.

    Please Login or Register  to view this content.
    Last edited by hani9041; 03-01-2012 at 03:29 PM. Reason: Added code

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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