+ Reply to Thread
Results 1 to 6 of 6

Drop down list to change cell fill color but not contents

  1. #1
    Registered User
    Join Date
    07-24-2015
    Location
    New York City
    MS-Off Ver
    Office 2011 for OS X
    Posts
    8

    Drop down list to change cell fill color but not contents

    Hello,

    I have a list of prices, real estate prices. I have all available properties with a green fill color and all sold properties with a red fill color. All prices vary. I have a function that takes the sum of all green cells and one that takes the sum of all the red cells.

    I want to be able to quickly change a cell from red to green and vice versa. I know that I can go into the color option and select the color, but this will draw confusion for the user if they select a different type of green or red. The cells need to be exactly one of the colors. Therefore, I would love to be able to click the cell and then a red and green box appear and I can select one color or the other.

    Thanks,

    Dan

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Drop down list to change cell fill color but not contents

    Im not sure about the method you'd like but how about changing the colour if you double click the cell?

    The attached will swap the colour around on the cells in columns 1 and 2 when double clicked. (You just need to amend the 255 (red) and 5287936 (green) to match the colours youre using (and obviously change the target checking to match the area you want in your sheet.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    07-24-2015
    Location
    New York City
    MS-Off Ver
    Office 2011 for OS X
    Posts
    8

    Re: Drop down list to change cell fill color but not contents

    Please look at the last tabs labeled 1st Floor, 2nd floor, etc...
    How do I apply what you are saying to my spreadsheet? Double clicking to change the color would work fine for me. Thank you.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Drop down list to change cell fill color but not contents

    I was trying to get this working using Workbook_SheetBeforeDoubleClick for a global solution however I kept hitting some unknown error, until that works you can add the following into each of the Floor sheets. In this version you can double click anywhere in a row to change the status of that row (as long as the row is currently a red or green row)

    Please Login or Register  to view this content.
    I have assumed in the above that your sheets will always have the same setup of 1st two columns containing the data.

  5. #5
    Registered User
    Join Date
    07-24-2015
    Location
    New York City
    MS-Off Ver
    Office 2011 for OS X
    Posts
    8

    Re: Drop down list to change cell fill color but not contents

    I just copy and paste this into the Visual Basic Editor, correct?

  6. #6
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Drop down list to change cell fill color but not contents

    Apologies, yes, copy and paste it into the relevant Worksheets within the VBA Editor

+ 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] Change a cells fill color. VBA to make another cell the same color and also changes.
    By PeteABC123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2016, 12:34 PM
  2. Replies: 0
    Last Post: 03-31-2015, 02:50 AM
  3. [SOLVED] Click oval option button to fill/unfill color, also change border color to match fill
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-07-2015, 08:29 PM
  4. 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
  5. [SOLVED] change fill color of a range of cells based on color of a cell?
    By DarMelNel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2014, 04:48 PM
  6. Replies: 0
    Last Post: 09-26-2012, 01:08 PM
  7. Replies: 3
    Last Post: 07-08-2010, 06:48 PM

Tags for this Thread

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