Results 1 to 7 of 7

Thread: Copy font color changes into another cell

  1. #1
    Seeker rich's Avatar
    Join Date
    Nov 2018
    Posts
    7
    Articles
    0
    Excel Version
    Prof. Plus 2016

    Copy font color changes into another cell



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have a worksheet that utilizes columns A thru M. Currently, columns D, E, F, G, and H are copied into columns O, P, Q, R and S. I would like to have O thru S also copy any changes to the font color in D thru H. I found a VBA code to do this cell by cell but canít get it to work for the entire column(s). How can I get this to work for the entire column(s)? Thank you!

  2. #2
    Wizard Pecoflyer's Avatar
    Join Date
    Oct 2011
    Location
    Brussels Belgium
    Posts
    1,512
    Articles
    0
    Excel Version
    2010 on Xubuntu
    So this is the same as Copy - Paste Special - Formats ?

    Please post a sample sheet and your code. Thx
    Last edited by Pecoflyer; 2018-11-08 at 08:32 AM.
    Thank you Ken for this secure forum.

  3. #3
    Seeker rich's Avatar
    Join Date
    Nov 2018
    Posts
    7
    Articles
    0
    Excel Version
    Prof. Plus 2016
    Thank you Pecoflyer for replying. It probably is as simple as Copy - Paste Special - Formats.

    Here is a sample of the sheet:
    A B C D E F G H I J K L M N O P Q R S
    Date Day Time Name IRLA BC IOA Tag CN BP SPACE IOA2JH FSC Name IRLA BC IOA Tag
    11/8/18 Thu 02:00 Doe, John Y Y N N Y Y Gingko Blossom Y PP Doe, John Y Y N N
    11/9 Fri 01:00 Doe, Jane N Y Y Y N N Lawn AW N PP Doe, Jane N Y Y Y

    The code I have used is:
    "Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Me.Range("P1").Font.Color = Me.Range("E1").Font.Color
    End Sub"
    But, I can't figure out how to modify this to work for multiple columns.

    The sheet has about 50 rows and each day I make changes in columns E, F, G, H, I, J, L. At the end of the day I have to generate a report of each change made during the day. The way I identify the changes is by marking the font RED. I added columns O thru S and have them copying/duplicating the content from D thru H. Columns O thru S is printed each day as my report of changes made because the person receiving this report does not need all the other information. I am trying to have any change, including font color, in E thru L automatically populated in O thru S. Thank you for your help!

  4. #4
    Wizard Pecoflyer's Avatar
    Join Date
    Oct 2011
    Location
    Brussels Belgium
    Posts
    1,512
    Articles
    0
    Excel Version
    2010 on Xubuntu
    When posting code, please wrap it with code tags ( Edit code - select code - click the #button.)
    It keeps the macro's structure and makes it easy to copy and handle.
    Thank you
    Thank you Ken for this secure forum.

  5. #5
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    719
    Articles
    0
    Excel Version
    Excel 2010 64bit
    try
    Code:
    Range(Cells(1, "D"), Cells(Rows.Count, "H").End(xlUp)).Copy
    Range("P1").PasteSpecial (xlPasteAll)

  6. #6
    Seeker rich's Avatar
    Join Date
    Nov 2018
    Posts
    7
    Articles
    0
    Excel Version
    Prof. Plus 2016
    Thank you Pecoflyer for teaching me about how to properly post code. In the future I will post correctly. Thank you!

  7. #7
    Seeker rich's Avatar
    Join Date
    Nov 2018
    Posts
    7
    Articles
    0
    Excel Version
    Prof. Plus 2016
    NoS, your code worked. Thank you for your help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •