+ Reply to Thread
Results 1 to 9 of 9

macro to Copy paste range skip zero values

  1. #1
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Thumbs up macro to Copy paste range skip zero values

    Hi all,
    I have a range of numbers AL5:AL22 (there is data below AL22) with no blanks but with zeros sometimes, appreciate providing a macro to copy this range (AL5:AL22), skip the cells with zero values and paste special (value) to the range A12.

    Thanks
    Last edited by Ralem; 05-25-2012 at 03:54 PM.
    Cheers
    Ralem

  2. #2
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Re: macro to Copy paste range skip zero values

    Heeeelp!

    If unclear please let me know...

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: macro to Copy paste range skip zero values

    Hi Ralem,

    Let's say you have this in the range starting with AL5

    Please Login or Register  to view this content.
    In A12 you want

    Please Login or Register  to view this content.
    HTH
    Regards, Jeff

  4. #4
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Re: macro to Copy paste range skip zero values

    Yes Jeffery exactly..

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: macro to Copy paste range skip zero values

    Hi Ralem,

    See if this does it for you...

    Set for AL5:AL22

    And results starting in A12

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Re: macro to Copy paste range skip zero values

    Fantastic Jeffery, thank you very very much..
    Last edited by Ralem; 05-25-2012 at 03:53 PM.

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: macro to Copy paste range skip zero values

    I'm sure this is possible, but what about it would you want to see different?

    Are you saying, if AL5:AL15 were all numbers, but from AL16:AL22 they were zero?

  8. #8
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Re: macro to Copy paste range skip zero values

    Yes, that's what I meant but realized it is the same for the macro you wrote...

    Thanks again

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: macro to Copy paste range skip zero values

    You're welcome Ralem…glad it worked for you and thanks for the feedback...

+ 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