+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting within dependent drop down lists

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    loughborough, england
    MS-Off Ver
    Excel 2007
    Posts
    3

    Conditional formatting within dependent drop down lists

    Hi there,

    I had a look through the site and couldn't find an answer so here it goes (sorry if i use the wrong terminology, I'll try to describe things as best I can):

    I have a spreadsheet with dependent drop down lists where I can choose from a list of 10 in the 1st cell. Then depending on what is selected in that cell will then give a different list in the second cell macthing the seelction in the first. Now what I want to implement is a way to indicate when the selection in the second list does not match up with the first, i.e. you make a selection in the second list but then the selection in the first list is changed meaning that the 2nd selection doesn't correspond to the 1st. I tried to use a combination of if, not and or functions to carry this out, which worked but there is a limit of 3 condtions per cell.

    The indication can be anything: highlight cell, change text colour, textbox etc. as long as it is clear that there is an error. Is there a way to use VBA to do this or a different way to do it using conditional formatting?

    Cheers

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,822

    Re: Conditional formatting within dependent drop down lists

    Post a sample workbook and I'll take a look at it for you.

    Pete

  3. #3
    Registered User
    Join Date
    10-11-2012
    Location
    loughborough, england
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional formatting within dependent drop down lists

    There we go that should be attached. Columns G and H have the dependent drop down lists, and I want H to somehow recognise when the selection in H doesn't match the list specificaed in G.

    Cheers
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,822

    Re: Conditional formatting within dependent drop down lists

    Okay, I've set this up using the named ranges which are shown in yellow, so I've used INDIRECT for the dependent lists. Then the conditional formatting applied to H3:H5 is using this formula:

    =ISNA(MATCH(H3,INDIRECT(G3),0))

    to set it to a red background. Change any of the errors in column G to see the effect.

    Hope this helps.

    Pete
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-11-2012
    Location
    loughborough, england
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Conditional formatting within dependent drop down lists

    Yes that is exactly what I was looking for, thank very much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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