+ Reply to Thread
Results 1 to 2 of 2

Cell Formatting Issue - Background Color

Hybrid View

  1. #1
    Registered User
    Join Date
    07-05-2016
    Location
    Seattle
    MS-Off Ver
    2010
    Posts
    19

    Cell Formatting Issue - Background Color

    Hi all,

    I have a macro that I have been working on that is pretty much done except for this formatting issue. The macro adds up all employee hours for the current week as well as hours for 8 weeks in advance. This is so I can project which employees I need to assign more hours to for upcoming projects.

    The employees are broken up into two categories: Engineers and CAD Technicians. The CAD technicians' names have a blue cell background and the Engineers' names have a white cell background on the "Project Lists" Sheet. When I run my macro, I want to be able to have the CAD techs' names be highlighted in blue, but I can't figure out how to do this in VBA. The "Schedule Summary" is dynamic, so I can't simply just format the cells before I run my macro.

    thank you!

    -norse

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,802

    Re: Cell Formatting Issue - Background Color

    How do you determine whether the name in a cell is an CAD tech name or an Engineer name?

    I suspect that conditional formatting will be a better solution for this than code. The .Interior.Color attribute of a cell is the background color. You can assign colors to it using RGB:

    ' Set background color to red
    Range("A1").Interior.Color = RGB(255, 0, 0)
    As usual, it would help to attach your file.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. [SOLVED] How to clear content on the cell that has background color from conditional formatting?
    By putritersenyum in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-18-2016, 10:13 AM
  2. Swapping cell content to INCLUDE CELL FORMATTING (Text color, background color, etc)
    By jcpeterson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-10-2014, 10:09 AM
  3. [SOLVED] Conditional Formatting Cell Background Color
    By claudia.p in forum Excel General
    Replies: 3
    Last Post: 07-02-2014, 10:50 AM
  4. Change cell background color based on another cells background color
    By Queo in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 06-10-2014, 05:28 AM
  5. Replies: 1
    Last Post: 11-11-2012, 09:33 AM
  6. Use VBA to lock all cell formatting except background color?
    By jmrazek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-26-2009, 06:39 PM
  7. [SOLVED] formatting background color of a cell with custom colors
    By sprasad in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-15-2005, 05:00 AM

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