Conditional Formatting with text

birdec

New Member
Joined
Jul 7, 2011
Messages
19
I have a list of first and last names in column A, some first names repeat.

I want to type in a first name in some cell (say H1) and all the cells in the list that have that same first name will be highlighted yellow.
 
Last edited:

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try Formula Is and the formula

=LEFT(A1,4)=H1

Hmm didn't work. Neil is not the only name I want highlighted. Any first name that I type in H1 I would like highlighted.

If I type the full name in H1 I can do the EQUALS TO format but I'm stuck if I just want to type the first name.
 
Upvote 0
You have to use the Formula Is option

Excel Workbook
ABCDEFGH
1Neil ArmstrongNeil
2Fred Scuttle
Sheet5
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A11. / Formula is =LEFT(A1,4)=H$1Abc
 
Upvote 0
Idk that didn't work. I wish I could insert an image here. What if the person's name was "Michael", you'd have to use =LEFT(A1,7)=H$1 wouldn't you?
 
Upvote 0
That works better!

But it usually gives me the name below the name I want
When I type in Kenya:

<table border="0" cellpadding="0" cellspacing="0" height="300" width="130"><colgroup><col style="mso-width-source:userset;mso-width-alt:4160;width:98pt" width="130"> </colgroup><tbody><tr style="height:12.75pt" height="17"> <td class="xl66" style="height:12.75pt;width:98pt" height="17" width="130">Student Name</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Tia Koth</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Clayton Bellis</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Ashlee Basch</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Hillary Kidney</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Neil Jahns</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Neil Hendryx</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Guy Kosak</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Hillary Humiston</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Kenya Smoak</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none;border:.5pt solid windowtext; background:yellow;mso-pattern:black none" height="17">Darren Agena</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Karina Krejci</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Guy Lyda</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Javier Vey</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Roslyn Folkes</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Julianne Ranum</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Roslyn An</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Lance Guider</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Alejandra Bielecki</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Max Buckalew</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Tanisha Lorentz
</td> </tr> </tbody></table>
and when I type in Neil:

<table border="0" cellpadding="0" cellspacing="0" width="130"><colgroup><col style="mso-width-source:userset;mso-width-alt:4160;width:98pt" width="130"> </colgroup><tbody><tr style="height:12.75pt" height="17"> <td class="xl66" style="height:12.75pt;width:98pt" height="17" width="130">Student Name</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Tia Koth</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Clayton Bellis</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Ashlee Basch</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Hillary Kidney</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Neil Jahns</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none;border:.5pt solid windowtext; background:yellow;mso-pattern:black none" height="17">Neil Hendryx</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none;border:.5pt solid windowtext; background:yellow;mso-pattern:black none" height="17">Guy Kosak</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Hillary Humiston</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Kenya Smoak</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Darren Agena</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Karina Krejci</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Guy Lyda</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Javier Vey</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Roslyn Folkes</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Julianne Ranum</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Roslyn An</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Lance Guider</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Alejandra Bielecki</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Max Buckalew</td> </tr> <tr style="height:12.75pt" height="17"> <td class="xl65" style="height:12.75pt;border-top:none" height="17">Tanisha Lorentz</td> </tr> </tbody></table>
 
Upvote 0
I missed out a $. Try

Excel Workbook
ABCDEFGH
1Student NameKenya
2Tia Koth
3Clayton Bellis
4Ashlee Basch
5Hillary Kidney
6Neil Jahns
7Neil Hendryx
8Guy Kosak
9Hillary Humiston
10Kenya Smoak
11Darren Agena
12Karina Krejci
13Guy Lyda
14Javier Vey
15Roslyn Folkes
16Julianne Ranum
17Roslyn An
18Lance Guider
19Alejandra Bielecki
20Max Buckalew
21Tanisha Lorentz
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A21. / Formula is =LEFT(A2,FIND(" ",A2)-1)=H$1Abc
 
Upvote 0

Forum statistics

Threads
1,215,746
Messages
6,126,641
Members
449,325
Latest member
Hardey6ix

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