+ Reply to Thread
Results 1 to 3 of 3

Toggle fill Color in cell based on condition of cell--blank or text added.

  1. #1
    Forum Contributor
    Join Date
    02-22-2014
    Location
    Winthrop, ME
    MS-Off Ver
    Excel 2010
    Posts
    420

    Toggle fill Color in cell based on condition of cell--blank or text added.

    Good afternoon. I'm using the following code to fill a cell red if the user exits the cell without choosing a name provided in the drop down list.

    Please Login or Register  to view this content.
    If the cell is left blank the fill color changes from the default color (i.e. RGB 196, 189, 151) to RGB (255, 0, 0). What I can't figure out is how to toggle the color from 255, 0, 0 (red) back to the default color 196, 189, 151 (greyish-brown). Thanks for any help you might be able to provide.

    Matthew

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Toggle fill Color in cell based on condition of cell--blank or text added.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    02-22-2014
    Location
    Winthrop, ME
    MS-Off Ver
    Excel 2010
    Posts
    420

    Re: Toggle fill Color in cell based on condition of cell--blank or text added.

    AlphaFrog,

    Once again, thanks for the addition to the code. It works perfectly. Thanks.

    Matthew

+ 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. Macro to change cell text color based on darkness of cell fill color
    By cincyshirm61 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2014, 12:11 PM
  2. Condition based on Cell Text Color
    By yogesh1904 in forum Excel General
    Replies: 2
    Last Post: 09-09-2012, 11:21 AM
  3. Color fill a cell and then remove the color when a date is added.
    By texas tornado in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2012, 02:14 AM
  4. Toggle Text Color in Cell A, when Cell B clicked...
    By woodman650 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2008, 02:22 AM
  5. Replies: 4
    Last Post: 01-12-2006, 09:50 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