+ Reply to Thread
Results 1 to 3 of 3

Preserve Cell Format

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Preserve Cell Format

    I am trying to find a way to preserve cell formatting. For example, cell A1 the color is Blue and the font size is 8. In cell B1 the color is red and font size is 10.

    If the user copies cell B1 and pastes into A1, the format in A1 has been changed. I want to preserve the original formatting.

    I tried to use conditional formatting, but that didn't work. Is there another way to accomplish this?

    Thank you in advance for any comments. If this can't be done, please let me know.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    You could use code. The below activates when the user copies and then paste special values if they use Ctrl + v to paste.

    Right click the sheet tab > select view code > paste in the below

    Please Login or Register  to view this content.
    then in a normal module place this code

    Please Login or Register  to view this content.
    HTH

    VBA Noob
    Last edited by VBA Noob; 07-25-2008 at 09:09 AM.
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173
    That works fine except that the code doesn't "reset" itself after the intial copy and paste. i.e. if I copy and paste a second time (say from another cell or another spreadsheet), the original formatting is no longer preserved.

    I hope that makes sense.

    Thanks

+ 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