Closed Thread
Results 1 to 12 of 12

Highlight cells based on dropdown selection

  1. #1
    Registered User
    Join Date
    01-19-2015
    Location
    Buffalo
    MS-Off Ver
    excel 2013
    Posts
    2

    Highlight cells based on dropdown selection

    Hello:

    I'm looking for the best way to have an excel 2010 spreadsheet highlight other cells in the same row based on a selection from a dropdown. The idea here is that whatever the user selects in the dropdown will highlight specific cells that will need to be filled out.

    Example: Dropdown list has option A: Add address, B: add phone number. User wishes to add address, so the cell in the address column will highlight the address cell in the same row. (Edit: I should mention that the dropdown would have 10-12 selections as opposed to just 2)

    Can this be accomplished with conditional formatting, or would it require more advanced VBA usage?

    Thank you!
    Last edited by fbhav; 01-19-2015 at 09:01 PM.

  2. #2
    Registered User
    Join Date
    09-08-2010
    Location
    Montenegro
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Highlight cells based on dropdown selection

    Yes, it can; check the attached file, please.

    Say that your named list is in cells A1:A12.

    First row with drop down list starts in cell B15, and captions are in cells C14 and rightwards. Then in cell C15 do this: Conditional formatting - New rule - Use a formula to determine which cell to format; then in the field type formula

    $B15=C$14

    and set format (in this case, I coloured cell in yellow). Then copy it right and down accross the range.

    So, if selected dropdown option is equal to column caption, respective cell will turn yellow. Use semi-absolute references to be able to copy the cell right and down; i.e., if you type, as Excel would turn it, $B$15=$C$14, then you could not copy it, so manually switch to semi-absolute references if Excel enters absolute ones.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    01-19-2015
    Location
    Buffalo
    MS-Off Ver
    excel 2013
    Posts
    2

    Re: Highlight cells based on dropdown selection

    Exactly what I was looking for. Thanks!

  4. #4
    Registered User
    Join Date
    03-31-2015
    Location
    georgia
    MS-Off Ver
    2010
    Posts
    11

    Re: Highlight cells based on dropdown selection

    Hi there this is exaclty what i'm looking to do, how did you code for when a selection was made, that it would highlight a certain colum cell?

    Quote Originally Posted by froment View Post
    Yes, it can; check the attached file, please.

    Say that your named list is in cells A1:A12.

    First row with drop down list starts in cell B15, and captions are in cells C14 and rightwards. Then in cell C15 do this: Conditional formatting - New rule - Use a formula to determine which cell to format; then in the field type formula

    $B15=C$14

    and set format (in this case, I coloured cell in yellow). Then copy it right and down accross the range.

    So, if selected dropdown option is equal to column caption, respective cell will turn yellow. Use semi-absolute references to be able to copy the cell right and down; i.e., if you type, as Excel would turn it, $B$15=$C$14, then you could not copy it, so manually switch to semi-absolute references if Excel enters absolute ones.

  5. #5
    Registered User
    Join Date
    09-08-2010
    Location
    Montenegro
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Highlight cells based on dropdown selection

    Quote Originally Posted by kevinthien View Post
    Hi there this is exaclty what i'm looking to do, how did you code for when a selection was made, that it would highlight a certain colum cell?
    It's just the conditional formatting. In the example file I attached to the post above, captions are in row 14, and they are compared to value from drop-down menu in column B; if they match, then the cell is highlighted.

    To accomplish that in, say, cell C15 (the first cell in range), select it (I mean, position a cursor there), then go to Conditional Formatting - New Rule; select "Use a formula to determine which cells to format", and in box below that, ""Format values where this formula is true" type this condition:

    =$B15=C$14

    Then click button "Format", choose the desired formatting and confirm it by clicking OK untill you exit the dialogue boxes.

    If you choose value from drop-down menu in cell B15 which is equal to caption in cell C14, it will get highlighted.

    Now, you see the references above are semi-absolute: column B and row 14 are absolutely referenced, which allows you to simply copy-paste this cell to desired range; if you copy it to the right, it will become

    =$B15=D$14

    so it will compare drop-down menu in cell B15 with caption in column D, and if you copy it down, it becomes

    =$B16=C$14

    so now drop-dwon menu in cell B16 is relevant, while column caption is still in cell C14.

    Hope it helps.

  6. #6
    Registered User
    Join Date
    03-31-2015
    Location
    georgia
    MS-Off Ver
    2010
    Posts
    11

    Re: Highlight cells based on dropdown selection

    thank you for hte quick response, sorry i think i should have mentioned alittle more detail. i have tried to recreate/understand your file but i am unable to.

    So for cell A1, i have a dropdown list of cells B1:AE1

    When i pick the first choice, the cell it should highlight is B1, when i make the second choice, it should high light C1, etc etc
    Last edited by kevinthien; 03-31-2015 at 03:38 PM.

  7. #7
    Registered User
    Join Date
    03-31-2015
    Location
    georgia
    MS-Off Ver
    2010
    Posts
    11

    Re: Highlight cells based on dropdown selection

    disregard this post.
    Last edited by kevinthien; 03-31-2015 at 03:39 PM.

  8. #8
    Registered User
    Join Date
    04-17-2015
    Location
    United Stated
    MS-Off Ver
    Excel 2013
    Posts
    1

    Re: Highlight cells based on dropdown selection

    Is there a way to do this in columns rather than rows? Doesn't seem to work when i do this in columns.

  9. #9
    Registered User
    Join Date
    09-04-2019
    Location
    Philippines
    MS-Off Ver
    MS excel 2016
    Posts
    2

    Re: Highlight cells based on dropdown selection

    Hi, I need help! How can I highlight selected cells depending on the option on the dropdown list? Is this possible in conditional formatting?

  10. #10
    Registered User
    Join Date
    09-04-2019
    Location
    Philippines
    MS-Off Ver
    MS excel 2016
    Posts
    2

    Re: Highlight cells based on dropdown selection

    Hi, I need help! How can I highlight selected cells depending on the option on the dropdown list? Is this possible in conditional formatting?

  11. #11
    Registered User
    Join Date
    01-04-2021
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    1

    Re: Highlight cells based on dropdown selection

    Quote Originally Posted by froment View Post
    Yes, it can; check the attached file, please.

    Say that your named list is in cells A1:A12.

    First row with drop down list starts in cell B15, and captions are in cells C14 and rightwards. Then in cell C15 do this: Conditional formatting - New rule - Use a formula to determine which cell to format; then in the field type formula

    $B15=C$14

    and set format (in this case, I coloured cell in yellow). Then copy it right and down accross the range.

    So, if selected dropdown option is equal to column caption, respective cell will turn yellow. Use semi-absolute references to be able to copy the cell right and down; i.e., if you type, as Excel would turn it, $B$15=$C$14, then you could not copy it, so manually switch to semi-absolute references if Excel enters absolute ones.


    Hi All,
    This works for exact match. What about drop down with different values, columns with different values? Please advise ASAP


    Thanks
    Jay

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Highlight cells based on dropdown selection

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Creating formulas for cells based on dropdown box selection
    By jay.to in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-13-2014, 06:34 PM
  2. Replies: 1
    Last Post: 07-03-2013, 10:50 AM
  3. Change values in cells based on dropdown selection
    By Gert Van Dessel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-19-2013, 09:31 AM
  4. How to lock few cells based on a selection from dropdown
    By sashikanth2274 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2010, 04:36 PM
  5. Copy cells based on dropdown selection
    By wcnwzrd in forum Excel General
    Replies: 1
    Last Post: 10-16-2009, 01:48 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