+ Reply to Thread
Results 1 to 3 of 3

How to copy cell formats from a sheet

  1. #1
    Registered User
    Join Date
    09-07-2009
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    19

    How to copy cell formats from a sheet

    In a macro, I am copying data from another sheet and most of the time I only require the actual data or the values as per below.

    Please Login or Register  to view this content.
    But sometimes I want to also copy the Formats of the cell eg. color etc.
    How do I go about doing this please?
    Last edited by Barcode; 09-10-2009 at 08:25 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to copy cell formats from a sheet

    To get the full cell to copy would require going to two lines of code:
    Please Login or Register  to view this content.
    This would copy formulas instead of values, though. There are many options to the PASTESPECIAL, you can try them all to see if any of them give you the exact behavior you want:
    Please Login or Register  to view this content.
    Perhaps it would be a combination of more than one...
    Last edited by JBeaucaire; 09-10-2009 at 07:07 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-07-2009
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: How to copy cell formats from a sheet

    Thanks JB, much appreciated

+ 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