Highlight cells if same word is used in same row

madforgolf

Board Regular
Joined
Oct 20, 2006
Messages
182
Office Version
  1. 365
  2. 2016
Hi
Im trying to run a football killers where if someone selected the same team in future weeks it would highlight it, so they would need to select another team.
table is over 200 rows
i have came across a formula placed in conditional formatting =COUNTIF($F2:$AS201,F2)>1 which is supposed to work across rows, bit its not working for me. It did work ( i think briefly, but then started highlighting teams in different rows

Con Format so it goes red if double used.
not sure if i have made a mistake on how its entered in conditional formatting

thanks for looking , any help or better way to highlight please let me know.
thanks
Marty
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I don't see a problem with that formula, other than that would use a $ for $AS$201. However, that wouldn't keep it from working the way you want.

What is in all those columns F:AS? Is it all team names? Are you looking for the same pick in the same column or in any column?

I suspect your requirement is not that clear. Could you post a small example of the data, pointing out the result you would like to see?

Here is a simplified example using your formula, which highlights when a pick is repeated in any column.
$scratch.xlsm
FGHI
1
2Dallas CowboysMiami DolphinsAtlanta FalconsMiami Dolphins
3Buffalo BillsSan Francisco 49ersPittsburgh SteelersDenver Broncos
4San Francisco 49ersNew York JetsTennessee TitansLos Angeles Chargers
5Tampa Bay BuccaneersCincinnati BengalsDenver BroncosTennessee Titans
6Baltimore RavensArizona CardinalsTennessee TitansChicago Bears
7Buffalo BillsCincinnati BengalsDenver BroncosIndianapolis Colts
8Cleveland BrownsAtlanta FalconsBuffalo BillsMinnesota Vikings
9Washington CommandersLos Angeles RamsAtlanta FalconsAtlanta Falcons
10Seattle SeahawksBaltimore RavensHouston TexansLos Angeles Chargers
11Green Bay PackersPhiladelphia EaglesSeattle SeahawksPittsburgh Steelers
12Cincinnati BengalsLas Vegas RaidersMinnesota VikingsBaltimore Ravens
13New Orleans SaintsDallas CowboysCarolina PanthersBaltimore Ravens
14Jacksonville JaguarsSan Francisco 49ersBaltimore RavensPittsburgh Steelers
15Los Angeles ChargersMiami DolphinsLos Angeles RamsCincinnati Bengals
Teams any column
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2:AS201Expression=COUNTIF($F2:$AS$201,F2)>1textNO


Here is the same data with a different rule that highlights only when a pick is repeated later in the same column:

$scratch.xlsm
FGHI
1
2Dallas CowboysMiami DolphinsAtlanta FalconsMiami Dolphins
3Buffalo BillsSan Francisco 49ersPittsburgh SteelersDenver Broncos
4San Francisco 49ersNew York JetsTennessee TitansLos Angeles Chargers
5Tampa Bay BuccaneersCincinnati BengalsDenver BroncosTennessee Titans
6Baltimore RavensArizona CardinalsTennessee TitansChicago Bears
7Buffalo BillsCincinnati BengalsDenver BroncosIndianapolis Colts
8Cleveland BrownsAtlanta FalconsBuffalo BillsMinnesota Vikings
9Washington CommandersLos Angeles RamsAtlanta FalconsAtlanta Falcons
10Seattle SeahawksBaltimore RavensHouston TexansLos Angeles Chargers
11Green Bay PackersPhiladelphia EaglesSeattle SeahawksPittsburgh Steelers
12Cincinnati BengalsLas Vegas RaidersMinnesota VikingsBaltimore Ravens
13New Orleans SaintsDallas CowboysCarolina PanthersBaltimore Ravens
14Jacksonville JaguarsSan Francisco 49ersBaltimore RavensPittsburgh Steelers
15Los Angeles ChargersMiami DolphinsLos Angeles RamsCincinnati Bengals
Teams same column
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2:AS201Expression=COUNTIF(F2:F$201,F2)>1textNO
 
Upvote 0
I just looked at your title, which says you want to see if a name occurs in the same row which is not remotely what your formula does.

If you want to highlight names when they are repeated to the right in the same row (still using the same sample data)

$scratch.xlsm
FGHI
1
2Dallas CowboysMiami DolphinsAtlanta FalconsMiami Dolphins
3Buffalo BillsSan Francisco 49ersPittsburgh SteelersDenver Broncos
4San Francisco 49ersNew York JetsTennessee TitansLos Angeles Chargers
5Tampa Bay BuccaneersCincinnati BengalsDenver BroncosTennessee Titans
6Baltimore RavensArizona CardinalsTennessee TitansChicago Bears
7Buffalo BillsCincinnati BengalsDenver BroncosIndianapolis Colts
8Cleveland BrownsAtlanta FalconsBuffalo BillsMinnesota Vikings
9Washington CommandersLos Angeles RamsAtlanta FalconsAtlanta Falcons
10Seattle SeahawksBaltimore RavensHouston TexansLos Angeles Chargers
11Green Bay PackersPhiladelphia EaglesSeattle SeahawksPittsburgh Steelers
12Cincinnati BengalsLas Vegas RaidersMinnesota VikingsBaltimore Ravens
13New Orleans SaintsDallas CowboysCarolina PanthersBaltimore Ravens
14Jacksonville JaguarsSan Francisco 49ersBaltimore RavensPittsburgh Steelers
15Los Angeles ChargersMiami DolphinsLos Angeles RamsCincinnati Bengals
Teams same column
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2:AS201Expression=COUNTIF(F2:$AS2,F2)>1textNO
 
Upvote 0
I just looked at your title, which says you want to see if a name occurs in the same row which is not remotely what your formula does.

If you want to highlight names when they are repeated to the right in the same row (still using the same sample data)

$scratch.xlsm
FGHI
1
2Dallas CowboysMiami DolphinsAtlanta FalconsMiami Dolphins
3Buffalo BillsSan Francisco 49ersPittsburgh SteelersDenver Broncos
4San Francisco 49ersNew York JetsTennessee TitansLos Angeles Chargers
5Tampa Bay BuccaneersCincinnati BengalsDenver BroncosTennessee Titans
6Baltimore RavensArizona CardinalsTennessee TitansChicago Bears
7Buffalo BillsCincinnati BengalsDenver BroncosIndianapolis Colts
8Cleveland BrownsAtlanta FalconsBuffalo BillsMinnesota Vikings
9Washington CommandersLos Angeles RamsAtlanta FalconsAtlanta Falcons
10Seattle SeahawksBaltimore RavensHouston TexansLos Angeles Chargers
11Green Bay PackersPhiladelphia EaglesSeattle SeahawksPittsburgh Steelers
12Cincinnati BengalsLas Vegas RaidersMinnesota VikingsBaltimore Ravens
13New Orleans SaintsDallas CowboysCarolina PanthersBaltimore Ravens
14Jacksonville JaguarsSan Francisco 49ersBaltimore RavensPittsburgh Steelers
15Los Angeles ChargersMiami DolphinsLos Angeles RamsCincinnati Bengals
Teams same column
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2:AS201Expression=COUNTIF(F2:$AS2,F2)>1textNO
Hi 6StringJazzer for the reply. sorry about the long wait in replying

i have revistied your comments and noticed when i entered your formulas i stiil had issues. Then i noticed i should have use =countifs (i missed the S) so now it is working as it should.

thank you for taking the time to responded to my query

regards

Marty
 
Upvote 1
Solution

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top