+ Reply to Thread
Results 1 to 7 of 7

Paste Special - Values, Formats and Column Width Not Working

  1. #1
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Hong Kong
    MS-Off Ver
    Office 365 PC Version
    Posts
    204

    Paste Special - Values, Formats and Column Width Not Working

    Dear All,

    Am using a cell reference to specify where to paste the results using copy, paste special in the code below.

    I am trying to clean up the code and developed 3 methods, 2 that work, but the 3rd does not.

    My question is, why does the 3rd method not work, as I have seen this illustrated in various sources online?

    Thanks for your help in advance, John.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Paste Special - Values, Formats and Column Width Not Working

    Maybe try something like this ?

    Please Login or Register  to view this content.
    I don't know why if without "with ... end with" it doesn't work,
    but if with "with ... end with" it works

  3. #3
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Hong Kong
    MS-Off Ver
    Office 365 PC Version
    Posts
    204

    Re: Paste Special - Values, Formats and Column Width Not Working

    Hello,

    I tried your suggestion but that did not work.

    Any other thoughts?

    Thanks John

  4. #4
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Hong Kong
    MS-Off Ver
    Office 365 PC Version
    Posts
    204

    Re: Paste Special - Values, Formats and Column Width Not Working

    I tried a variant of Method 4 and it pasted the values but then gives an error when it comes to pasting the formats.

    Please Login or Register  to view this content.
    Any other suggestions?

    Thanks John

  5. #5
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Paste Special - Values, Formats and Column Width Not Working

    Quote Originally Posted by John Vieren View Post
    I tried a variant of Method 4 and it pasted the values
    but then gives an error when it comes to pasting the formats.
    Any other suggestions?

    Thanks John
    Sorry, I don't know for other suggestion.
    I think I need to see the sample workbook to know what are there in the cells to be copied.

  6. #6
    Registered User
    Join Date
    05-14-2020
    Location
    Mauritius
    MS-Off Ver
    Office 365
    Posts
    97

    Re: Paste Special - Values, Formats and Column Width Not Working

    Try it like this:
    Please Login or Register  to view this content.
    Your 3rd code is working but you should put the range name in "" instead of [] like you did with the source range
    Greetings

    Tor


  7. #7
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Hong Kong
    MS-Off Ver
    Office 365 PC Version
    Posts
    204

    Re: Paste Special - Values, Formats and Column Width Not Working

    Hi,

    The reason i am using [] is because in the sell is a formula that produces the range to paste to, for example A1:B10.

    The code pastes the values correctly but fails on pasting the formats.

    Meaning that using the brackets is working and something else is the problem.

    Thanks John

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How can I get my formula to 'paste special values' to preserve date formats?
    By mltornroth in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-08-2013, 12:37 AM
  2. Loop with Paste Special Values, Formats but no Borders
    By John Vieren in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2012, 10:07 AM
  3. [SOLVED] Copy and paste special values and formats
    By Blake 7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2012, 07:14 AM
  4. paste special column width
    By rhudgins in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-25-2011, 02:20 PM
  5. Paste Special Values and Formats
    By robertc12 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2009, 02:22 PM
  6. Paste Special: Values, Formats, and Comments
    By nhrav in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2008, 03:33 AM
  7. Paste Special Column Width
    By avveerkar in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-29-2007, 04:19 AM
  8. [SOLVED] Copy and paste special, values not working
    By mcarley in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2005, 10:25 PM

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