+ Reply to Thread
Results 1 to 3 of 3

Validate cell value based on index/match or Vlookup using conditional formatting question

  1. #1
    Registered User
    Join Date
    11-24-2005
    Posts
    39

    Validate cell value based on index/match or Vlookup using conditional formatting question

    Good Morning

    Not sure if this is the correct area, but here goes.

    I have a data validation drop down list that will populate a range of cells.

    The data for the pull down list is located in range AQ1:AQ300

    in range AQ1:AR300 I have the Gender of the corresponding name in AQ


    Now the pull down list is used in ranges A1:A150 as well as B1:B150

    If the Gender of the name dropped into A1:A150 does not equal "M", then fill the cell color RED to show a Female was mistakenly placed in a Male room.

    If the Gender of the name dropped into B1:B150 does not equal "F", then fill the cell color RED to show a Male was mistakenly placed in a Female room.


    what would the most logical method be to acheive this?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Validate cell value based on index/match or Vlookup using conditional formatting quest

    You would use Conditional Formatting for this.

    1. highlight the range you want to apply the conditional formatting to (A1:A150)
    2. on the home tab, styles, select CF
    3. select new rule, select use formula
    4. enter =A1<>"M"...format fill RED
    repeat in B with F
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Validate cell value based on index/match or Vlookup using conditional formatting quest

    Here's a solution that assumes the mens names go into columnA and the womens into ColumnB.

    Select Cells in ColumnA ... starting with cell A1
    on Home Tab select "Conditional Formatting"
    On Conditional Formatting drop down select "New Rule..."
    Select "use formula to determine which cells to format"

    copy in this formula =AND(COUNTIFS(AQ:AQ,A1,AR:AR,"M")=0,COUNTIF(AQ:AQ,A1)>0)
    click the "format" command button to select format
    Click OK


    Now do same for ColumnB ... this time use this formula
    =AND(COUNTIFS(AQ:AQ,B1,AR:AR,"F")=0,COUNTIF(AQ:AQ,A1)>0)

+ 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. Conditional Formatting - 2 sheets using Vlookup or Index/Match or SumProduct?
    By phrankndonna in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2016, 01:38 PM
  2. Simple solution. Criteria based conditional formatting. (Index match) HELP!
    By omni13 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-18-2013, 12:11 PM
  3. [SOLVED] Conditional formatting based on VLOOKUP/INDEX:MATCH
    By strud in forum Excel General
    Replies: 2
    Last Post: 06-13-2013, 07:02 AM
  4. [SOLVED] Conditional formatting based on VLOOKUP & HLOOKUP or MATCH
    By Joss.Terrell in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-27-2012, 11:43 PM
  5. Match Index or Vlookup formula question
    By ianco in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-21-2012, 08:20 AM
  6. VLOOKUP(), INDEX(), OFFSET() and MATCH() Question
    By Paddon in forum Excel General
    Replies: 2
    Last Post: 11-03-2011, 01:15 PM
  7. VLookup / Match / Index question
    By mattyb in forum Excel General
    Replies: 2
    Last Post: 03-16-2009, 02:49 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