+ Reply to Thread
Results 1 to 10 of 10

Macro to copy row information from sheet to sheet won't work

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Macro to copy row information from sheet to sheet won't work

    I have a workbook with two worksheets. I am trying to run a macro that will copy row information from sheet "jobs" to sheet "open jobs" when column G has a Y entered in the cell.

    This is the code I am using:

    Please Login or Register  to view this content.
    but when I run the macro it does not move any information

    I also want a pop up that will tell me that the information is complete but I do not know how to do that.

    I am sure the error is probably user issues but I do not know how to fix it from here.

    Thanks,

    Beth
    Last edited by jeffreybrown; 09-05-2012 at 05:14 PM. Reason: Added code tags for new user...please add them next time...

  2. #2
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    935

    Re: Having trouble getting my macro to run...possibly I have the code entered wrong

    Works fine. Did you copy the macro in the "Jobs" sheets' code module ? Are you using the right letter case (Y/y) ?
    Last edited by rollis13; 09-06-2012 at 06:18 PM.

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Macro to copy row information from sheet to sheet won't work

    Try,

    Please Login or Register  to view this content.
    If you want the Code to ignore Upper- or Lower Case, we can incorporate that for you.

    Hope that helps.

    Also see the "Please consider" Note at the bottom of this post.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  4. #4
    Registered User
    Join Date
    09-05-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Having trouble getting my macro to run...possibly I have the code entered wrong

    JOBS 1.xlsmHere is my spreadsheet. I do have it copied in the "Jobs" sheet module. I didn't know case sensitivity was a problem. But now, after changing the code to the one suggested on this thread, I can not even view it as a macro to try to run it. I do not know what went wrong but the code is there and I believe in the right place.

  5. #5
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    935

    Re: Having trouble getting my macro to run...possibly I have the code entered wrong

    Go back to your script post #1 and just change "y" to "Y" and it will copy your row only when you write Y in a cell of column G:
    Please Login or Register  to view this content.
    But I have the feeling that you aren't after this. If I understand (better) you don't want the copying done at once when you write the Y, but you want it to run through all the rows now that the Y and N are already in place. Am I right ?
    Last edited by rollis13; 09-07-2012 at 05:02 PM.

  6. #6
    Forum Contributor
    Join Date
    07-26-2012
    Location
    USA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    351

    Re: Macro to copy row information from sheet to sheet won't work

    Try changing:
    Please Login or Register  to view this content.
    to this:
    Please Login or Register  to view this content.
    Also change the y to Y

    Not sure why it isn't working though. I removed the ByVal Target As Range and was able to step into it 1 time, but only once. That issue is a little beyond me

  7. #7
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Macro to copy row information from sheet to sheet won't work

    Try the attached WorkBook.

    The Code is not in a Module. It is in the Worksheet_Change_Event of Sheet2.

    Hope that helps.

    Also see the "Please consider" Note at the bottom of this post.
    Attached Files Attached Files
    Last edited by Winon; 09-10-2012 at 12:07 AM. Reason: Revised Code

  8. #8
    Registered User
    Join Date
    09-05-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Macro to copy row information from sheet to sheet won't work

    That works beautifully.....thank you!!

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Macro to copy row information from sheet to sheet won't work

    You are welcome.

    Glad I could help.

  10. #10
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Macro to copy row information from sheet to sheet won't work

    Sorry, I completely forgot about your request for:
    I also want a pop up that will tell me that the information is complete but I do not know how to do that.
    Does the attached WorkBook comply with that need?

    Also see the "Please consider" Note at the bottom of this post. Click on the star at the bottom left of the post to add to my reputation.
    Attached Files Attached Files

+ 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