+ Reply to Thread
Results 1 to 9 of 9

copy only fonts(text color) from one string of text to another string of text

  1. #1
    Registered User
    Join Date
    03-27-2013
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    13

    copy only fonts(text color) from one string of text to another string of text

    Can someone please help me with a short sub routine that shows how to copy only the fonts, basically just the color fonts, from one range to another range; ie copy only the colors not the values from one range of text to another range of text. I have looked everywhere and their are no Excel functions that will do this and I can't figure out how to do this in vba. xlspastespecial doesn't recognize the font values.

    Thanks very much,

    Andrew
    [email protected]

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: copy only fonts(text color) from one string of text to another string of text

    1. Copy the range/cell of formatting that you want
    2. Select the range you want to duplicate the formatting in
    3. Select "Paste Special" ---> "Format"
    Elegant Simplicity............. Not Always

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: copy only fonts(text color) from one string of text to another string of text

    Does something like this help?

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-27-2013
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: copy only fonts(text color) from one string of text to another string of text

    Thank you John. However, the code worked one time then stopped. I added the following line, but that still didn't help. Any Idea why this is?
    Application.CutCopyMode = False

    Thanks again,

    Andrew

  5. #5
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: copy only fonts(text color) from one string of text to another string of text

    Did you change the font color in B2:E2 before running the code a second time

  6. #6
    Registered User
    Join Date
    03-27-2013
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: copy only fonts(text color) from one string of text to another string of text

    Hi AndyLitch,

    No that wasn't the problem. Could it be that I am using Excel 2003? But it worked once? As a fix I also copied the macro to the file were I wanted to use the macro instead of keeping it in the Personal Files, but that didn't help either. Any other ideas about why it doesn't work?

    Thanks,

    Andrew

  7. #7
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: copy only fonts(text color) from one string of text to another string of text

    I tested it on my system and it works fine except that the font color is determined by the font color in cell B2 only.
    Your Excel version should not make any difference.

    as a troubleshooting aide try amending it to this

    Please Login or Register  to view this content.
    Or

    Please Login or Register  to view this content.
    Last edited by AndyLitch; 05-01-2013 at 01:20 AM.

  8. #8
    Registered User
    Join Date
    03-27-2013
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: copy only fonts(text color) from one string of text to another string of text

    Hi Andy,

    Neither sub routine worked. There must be a way to do this. Does anyone know the answer?

    Thanks,

    Andrew

  9. #9
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: copy only fonts(text color) from one string of text to another string of text

    Check the target range for conditional formatting and delete it....

+ 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