+ Reply to Thread
Results 1 to 5 of 5

how to get a cell highlighted with a particular color when it is selected?

  1. #1
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2019
    Posts
    545

    how to get a cell highlighted with a particular color when it is selected?

    when i click on a cell it should be highlighted with color yellow? while doing this the preexisting color should not go when we change the mouse. there are numerous suggestions in various places. but that vba when i added to the excel file does not show in the macro list. i am not able to save it to my personal excel workbook. how can it be accomplished.

    see this macro
    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time in the interests of moving things along. --6StringJazzer
    Last edited by 6StringJazzer; 08-01-2018 at 03:05 PM.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: how to get a cell highlighted with a particular color when it is selected?

    This code is an event code recorded in the sheet' code
    To see it you have to right clic the tab where it is recorded and select View Code
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: how to get a cell highlighted with a particular color when it is selected?

    You could put this code in the ThisWorkbook module of your PersonalMacroWorkbook.
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2019
    Posts
    545

    Re: how to get a cell highlighted with a particular color when it is selected?

    [QUOTE=mikerickson;4947481]
    works fine. thank you.
    But as per the code,when i format a cell (eg.D5)background as lightblue and then i move to another cell (eg.F6)the format already done in D5 cell goes. it should not happen. could you pls edit the code ?
    Last edited by sumesh56; 08-19-2018 at 09:36 PM.

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: how to get a cell highlighted with a particular color when it is selected?

    No. I don't know how to do that.

+ 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. Replies: 5
    Last Post: 07-23-2015, 04:19 AM
  2. Is it possible to assign a key to automatically fill color in the highlighted cell(s)?
    By Moonbather in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2013, 11:58 AM
  3. Change all cell's color from selected color
    By pmgu in forum Excel General
    Replies: 1
    Last Post: 03-10-2011, 10:43 AM
  4. Color Cell Selected
    By efhartman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-28-2009, 02:13 PM
  5. 1 Cell Selected, 2 More Highlighted
    By Leyte in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-21-2008, 03:40 PM
  6. Is there a way to sort By highlighted cell color?
    By tvance929 in forum Excel General
    Replies: 4
    Last Post: 11-20-2007, 03:46 PM
  7. Cell color when selected
    By Brad in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-22-2005, 05:39 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