View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Patrick C. Simonds Patrick C. Simonds is offline
external usenet poster
 
Posts: 343
Default Conditional format issue

Thank you, that worked sort of.

First I changed the formula a bit because I had to change the structure of
the worksheet, and I need to set the color yellow if there are two
occurrences of the name and red if there are more than two occurrences:

=AND(((COUNTIF($C$1:$C$1000,$C140)=2)=TRUE),((COUN TIF($D$1:D1000,$D140)=2)=TRUE))The problem is if there are only 2 Ross Charles to works fine but with inthe range (C1:C1000 and D1:D1000) if there is say a Miller Charles it nolonger works.As a conditional format I want it to look at the combined Last and Firstnames and then apply the format based on how many times that combinationexists."Rick Rothstein (MVP - VB)" wrote inmessage ... Do column A and column B separately. Select, say, column A first. Put thisformula... =AND(((COUNTIF($A$1:A1,A1)1)=TRUE),((COUNTIF($B$1 :B1,B1)1)=TRUE)) in its formula field (and select red for its condition). Now select columnB and put the **same** formula in its formula field (and select red for itscondition). Rick "Patrick C. Simonds" wrote in . ..I have a worksheet with 15 columns. Column 1 is labeled "Last Name" andcolumn 2 is labeled "First Name". I need to create a conditional format thatwill turn a cell red if a name (first and last) appears more than two times. I can create a conditional format that will work with the Last Name: =IF(COUNTIF($A$7:$A$1000,$A140))2 And one that works with the First Name: =IF(COUNTIF($B$1:$B$1000,$B140))2 But I can not think of a way to put them together in some way that works.I tried: =IF(COUNTIF($A$1:$A$1000,$A140),COUNTIF($B$1:$B$10 00,$B140))2 The problem I run into is that while last names are less like to beassociated to more than 1 person (although it certainly can me, which is whyI did not want to rely on last name alone) first names can be very commonamong numerous people. So any ideas how I can count say the Bob Millers inthe list while excluding the Bob Adams, Bob Hills ect.?