+ Reply to Thread
Results 1 to 12 of 12

Copy Paste Macro with Values & Skipping Blanks

  1. #1
    Registered User
    Join Date
    05-30-2012
    Location
    LONDON
    MS-Off Ver
    Excel 2003
    Posts
    7

    Copy Paste Macro with Values & Skipping Blanks

    Hi all

    I have just joined here having recently discovered the potential of macros. I came across this thread in my initial search: http://www.excelforum.com/excel-prog...ro-values.html

    The code posted by Leith Ross worked perfectly except I would like it to only paste cell values as opposed to the formulas in them. Is this possible or am I looking at building a new macro?

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy Paste Macro with Values & Skipping Blanks

    There is no code there from Leith Ross. Did you post the link to the right thread? Or did you mean the code by jeffreybrown?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    05-30-2012
    Location
    LONDON
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy Paste Macro with Values & Skipping Blanks

    Yes I meant jefferybrown. Sorry was reading another thread with code from Leith Ross.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy Paste Macro with Values & Skipping Blanks

    This is the code from that thread
    Please Login or Register  to view this content.
    It is already pasting the values. See this line
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-30-2012
    Location
    LONDON
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy Paste Macro with Values & Skipping Blanks

    Oh god I'm an idiot... I did have the wrong thread. The code is here: http://www.excelforum.com/excel-prog...ing-macro.html by Leith Ross.

    Sorry for the wild goose chase, this is doing my head in. The code by jefferybrown isn't suitable for what I'm trying to achieve. I tried building a code from scratch but found myself over complicating it and running into issues. The code by Leith works, but I can't seem to adapt it to paste values only.

    Thanks for your attention so far mate, any ideas?

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy Paste Macro with Values & Skipping Blanks

    Try this
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    05-30-2012
    Location
    LONDON
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy Paste Macro with Values & Skipping Blanks

    Unfortunately that didn't remove the blank cells.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy Paste Macro with Values & Skipping Blanks

    Do you have a sample file that i could test on?

  9. #9
    Registered User
    Join Date
    05-30-2012
    Location
    LONDON
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy Paste Macro with Values & Skipping Blanks

    I've attached a quick sample from the data I'm using. The formula is different but it shouldn't affect the test given it's a formula?

    Testing.xlsm

  10. #10
    Registered User
    Join Date
    05-30-2012
    Location
    LONDON
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy Paste Macro with Values & Skipping Blanks

    Perhaps I'm being too ambitious, this has been doing my head in for a couple of days. I think a slightly more manual system will have to do for this in the short term. Going to continue to learn until I get this fully automated though.

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy Paste Macro with Values & Skipping Blanks

    I got it to work for you - Replace this line
    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    05-30-2012
    Location
    LONDON
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy Paste Macro with Values & Skipping Blanks

    Wow you are a legend. I knew I was over complicating things. Thanks for all your help!

+ 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