+ Reply to Thread
Results 1 to 4 of 4

Using VBA to copy cell font color

  1. #1
    Forum Contributor
    Join Date
    10-10-2015
    Location
    the Dysfunctional Empire of Bulgaria
    MS-Off Ver
    2010
    Posts
    102

    Using VBA to copy cell font color

    I have a process which generates cell values in a fixed range. Based on the cell value the font color of that same cell sometimes changes.

    Then I have another "depository" range where I place the list of the values of the fixed range.

    For example,

    Please Login or Register  to view this content.
    In the code above Cells(1,1) is the fixed range, its value changes based on another process, and as mentioned sometimes the cell font takes on another color.

    Now each time I run the process the Cells(1,1).Value gets put in the "next" empty row, hence the "a" variable.

    The problem is that Cells(a,10).Value only takes on the value of Cells(1,1), how do I make Cells(a,10) also take on the font color of Cells(1,1)?
    Last edited by lostest; 03-01-2016 at 05:31 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-26-2012
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    422

    Re: Using VBA to copy cell font color

    Can you simply copy and paste, or are there other formatting elements you want to avoid?

    If copy and paste is ok for you then try this:
    Please Login or Register  to view this content.
    If you don't want copy and paste, then this will work

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor amartinez988's Avatar
    Join Date
    05-04-2015
    Location
    Miami
    MS-Off Ver
    Office 2010
    Posts
    183

    Re: Using VBA to copy cell font color

    try this:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    10-10-2015
    Location
    the Dysfunctional Empire of Bulgaria
    MS-Off Ver
    2010
    Posts
    102

    Re: Using VBA to copy cell font color

    Yes, I only needed the font color.

    I also imagine the .copy would also be much slower?

    The font.color worked great.

    Thanks.

+ 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. Mouse rolls over to cell will change the tab color, font color and tp bold type
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-20-2013, 10:36 AM
  2. Change Font Color Based On Adjacent Cell Color
    By Zorro9758 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2013, 02:47 PM
  3. Replies: 2
    Last Post: 02-04-2013, 02:00 PM
  4. Use VBA to copy Data Validation reference cell font color to destination cell?
    By proav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-07-2012, 08:09 PM
  5. Change font color based on font color of another cell
    By Ibyers in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2012, 09:36 AM
  6. Sorting by Cell Color, Font Color or Cell Icon in Excel 2007
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 11-19-2007, 12:23 PM
  7. Replies: 3
    Last Post: 11-02-2005, 07:55 PM
  8. Replies: 1
    Last Post: 10-28-2005, 12:05 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