Excel Conditional Formatting Not Accurately Formatting

rekent

New Member
Joined
Jan 29, 2016
Messages
10
I am attempting to highlight cells in Column A if the same data contained in the cell is found anywhere in Column B. I am doing this via Conditional Formatting and the formula =NOT(ISNA(VLOOKUP(A1,$B:$B,1,FALSE))). However, multiple cells in Column A that have the same content as a cell in Column B are not highlighting. For one specific example, see B83 and A103, which both include the value 3300-51300, but A103 is not highlighted.

test file.xlsx
AB
13300-421004580-00100
23300-229004300-66000
33343-003013300-06000
43326-022013300-05100
53326-008003328-03300
63328-017013328-03401
74638-001014581-00101
83328-017004470-00103
93328-018004599-01100
103328-019014502-25400
113328-019004194-94502
123300-536004300-71500
133343-225003300-14200
143343-060013300-11700
153343-001013300-12500
163343-397003300-11600
173343-481004168-02901
183328-012014214-44905
193328-012003328-02901
203328-014003326-03000
213300-581003300-17300
223343-230003328-01004
233343-502004300-57801
243343-394003300-19700
253326-050003300-19200
263343-061013300-19800
273328-006013300-19300
283343-226003300-20600
293328-030003300-19600
303328-006003300-20500
314214-548074214-59609
323343-489003300-23000
333343-507003328-00503
343300-459004470-00300
353300-460003300-25900
363343-600003328-01602
373326-061004470-00301
383328-002003300-27400
393343-385003300-29400
403300-392003300-31200
413300-116003300-31300
423326-005003300-32200
433326-006003300-33800
443300-590003300-32400
453326-014003300-32600
463328-001013300-32700
473328-004013300-32500
483328-005013300-35100
493328-001003300-35700
503328-004003300-35900
513328-008013300-36000
523328-005003300-32800
533343-511003300-37700
543343-508003300-37800
553326-009003300-37900
563326-010003300-38000
573326-035003300-38100
583328-010043300-39200
593343-512003300-39700
604214-622373300-41700
613326-033003300-39100
623326-034003326-08000
633343-515003326-08300
644819-001003300-41900
654470-001033300-41100
663300-696003300-43000
673300-317003300-43300
683300-72000 NR3300-43200
693300-192003300-43400
703300-380003300-43500
713300-183003326-09200
723300-312004300-85500
733300-316004300-85400
743326-070004300-85600
753300-388004300-85800
763300-189003326-10600
773300-381003300-48600
783343-454003326-10900
793343-395003326-10200
804780-013013300-50500
813343-054003300-50900
823343-320003300-51300
834780-013004752-00800
843300-230003300-53400
853300-184004780-01500
864780-014003300-53600
873300-324003300-53700
883300-214003326-03701
893300-458003300-55600
903300-379003300-56100
913300-456003300-56500
923300-457004780-00202
933300-505004786-01600
943300-509004780-01700
953300-699003300-56200
963300-423003300-58100
973300-377003343-45500
983300-391003300-57400
993300-454003300-59000
1003300-486003300-59500
1013300-507003300-60500
1023300-513003343-51100
1033300-726003343-51500
1043300-45100 NR3343-51600
1053343-579003300-63200
1063343-036013300-64800
1074580-001003300-64900
1083300-74300 NR4214-00000
1094581-001004214-59623
1103328-034013343-52600
1113326-045003343-52700
1123328-037013300-63400
1133300-339003343-52800
1144780-020013300-63300
1154780-020023343-53500
1164780-020043343-53600
1174780-020063300-63700
1184780-020003300-68200
1194780-020033300-67300
1203300-411003300-64400
1213300-419003300-68100
1223300-428003300-64300
1233300-341004768-00200
1243300-227003300-70000
1254214-207043300-68000
1263300-193004780-01301
1273343-581004780-01401
1283300-323003347-00105
1293300-633003347-00110
1303300-637003300-67000
1313326-022004780-01501
1323328-005033300-70400
1334780-015003343-59300
1343300-648003300-67100
1354780-015013343-60400
1363328-016013300-68600
1373328-016003300-70600
1383300-205003300-71700
1393326-021003300-72900
1403300-417003300-74300
1413326-102003300-74400
1423343-400003300-70800
1433328-03501
1443326-02400
1453300-45400 NR
1463347-00110
1473328-03500
1484470-00300
1494470-00200
1504470-00301
1514214-59612
1523326-00201
1533326-00202
1543326-00301
1553326-00302
1563300-42200
1573300-43000
1583300-43200
1593300-43300
1603300-63200
1613328-00502
1623343-00901
1633300-25900
1643300-56200
1653326-05300
1664214-69501
1673328-02901
1683300-26500
1694214-60910
1703300-25800
1713326-00200
1723326-00300
1733326-03000
1743328-02902
1753300-24900
1763300-11700
1773343-02401
1783328-02900
1793343-26800
1803300-55600
1813300-56100
1823343-07501
1833300-35000
1843326-08200
1854780-00101
1864780-00102
1874780-00104
1883328-02001
1893300-45100
1903328-02000
1913328-03700
1923326-05200
1933328-00201
1943300-50800
1953328-02601
1963328-02801
1973328-02600
1983328-02800
1993300-65500
2003300-43400
2013326-02401
2024214-67500
2033300-53400
2043328-01001
2053300-34900
2064780-02300
2074214-62904
2083328-01101
2093328-01100
2103343-57100
2113300-57400
2123326-03701
2133300-21500
2144214-69500
2154780-01901
2163300-72000
2174780-01900
2183343-41700
2193343-62500
2203343-17301
2213326-04900
2223300-39700
2234780-00200
2244780-00202
2253300-22800
2263300-32200
2273300-33800
2284168-02900
2294786-01600
2303300-19800
2313300-31300
2323343-42600
2333300-36000
2343300-34000
2353300-71800
2363343-62900
2373343-62900 NR
2383300-35700
2393300-35800
2403300-36100
2414214-44905
2423343-58200
2433300-62300
2443343-59400
2453300-35900
2463300-14200
2473300-53700
2483343-45500
2493328-02300
2503328-02301
2513328-02501
2523328-01501
2533328-02500
2543300-69400
2553326-03200
2563326-04700
2573300-69200
2583328-02201
2593300-72100
2604597-00100
2613300-52600
2623300-72100 NR
2633326-09200
2643347-00103
2653347-00104
2663347-00105
2673347-00106
2683347-00107
2693347-00109
2704780-01804
2714780-01805
2723328-02200
2734780-01802
2744780-01803
2753300-32800
2763328-02002
2773343-10301
2783326-03001
2793326-03401
2803326-03501
2813326-03901
2823300-18600
2833328-01300
2843326-08300
2853300-18500
2863300-27300
2873328-01500
2883326-10900
2893300-58300
2903300-39000
2914581-00101
2923343-30200
2933300-29400
2943300-62100
2954780-01800
2963343-54300
2973326-03900
2983343-53700
2993300-25400
3003328-00702
3013328-00700
3023300-08600
3033328-00703
3044100-04203
3053343-54200
3063343-37800
3073343-37600
3083343-53100
3093343-53200
3103300-60500
3113300-64900
3124214-59623
3133343-41900
3143343-43500
3153300-37800
3163326-01500
3173328-03100
3183328-00802
3193300-52700
3203300-59500
3213300-37100
3224470-00104
3234470-00105
3243300-06000
3254780-01700
3263300-56500
3273300-35100
3283326-08000
3293343-37400
3303328-00701
3313343-01701
3323343-08901
3333300-38400
3343328-00803
3353328-01002
3363328-03101
3373300-27400
3383343-52900
3393343-53800
3403343-53900
3413343-54000
3423328-03102
3433328-03103
3443328-01003
3453328-00800
3463328-01000
3473300-42700
3483343-36800
3493328-03302
3503328-03301
3513300-26200
3523328-03300
3534786-01601
3544786-01602
3553300-17300
3563328-00301
3573328-03402
3583343-44700
3593326-10600
3604780-00100
3613343-30400
3624780-01801
3634780-00201
3643328-00300
3653343-41600
3664599-01100
3674780-02100
3684780-02200
3693300-74400 NR
3703328-03400
3713326-03700
3723343-44500
Patents
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:A1048574Expression=NOT(ISNA(VLOOKUP(A2,$B:$B,1,FALSE)))textNO
 
Last edited:

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
The formula must look at the first row in the applies to range.
So either Change A2 to A1 or change the applies to range to start at row2
 
Upvote 0
Hi,

Aside from matching the Start cell in the formula, why not use Just COUNTIF ?

Book3.xlsx
AB
13300-421004580-00100
23300-229004300-66000
33343-003013300-06000
43326-022013300-05100
53326-008003328-03300
63328-017013328-03401
74638-001014581-00101
83328-017004470-00103
93328-018004599-01100
103328-019014502-25400
113328-019004194-94502
123300-536004300-71500
133343-225003300-14200
143343-060013300-11700
153343-001013300-12500
163343-397003300-11600
173343-481004168-02901
183328-012014214-44905
193328-012003328-02901
203328-014003326-03000
213300-581003300-17300
223343-230003328-01004
233343-502004300-57801
243343-394003300-19700
253326-050003300-19200
263343-061013300-19800
273328-006013300-19300
283343-226003300-20600
293328-030003300-19600
303328-006003300-20500
314214-548074214-59609
323343-489003300-23000
333343-507003328-00503
343300-459004470-00300
353300-460003300-25900
363343-600003328-01602
373326-061004470-00301
383328-002003300-27400
393343-385003300-29400
403300-392003300-31200
413300-116003300-31300
423326-005003300-32200
433326-006003300-33800
443300-590003300-32400
453326-014003300-32600
463328-001013300-32700
473328-004013300-32500
483328-005013300-35100
493328-001003300-35700
503328-004003300-35900
513328-008013300-36000
523328-005003300-32800
533343-511003300-37700
543343-508003300-37800
553326-009003300-37900
563326-010003300-38000
573326-035003300-38100
583328-010043300-39200
593343-512003300-39700
604214-622373300-41700
613326-033003300-39100
623326-034003326-08000
633343-515003326-08300
644819-001003300-41900
654470-001033300-41100
663300-696003300-43000
673300-317003300-43300
683300-72000 NR3300-43200
693300-192003300-43400
703300-380003300-43500
713300-183003326-09200
723300-312004300-85500
733300-316004300-85400
743326-070004300-85600
753300-388004300-85800
763300-189003326-10600
773300-381003300-48600
783343-454003326-10900
793343-395003326-10200
804780-013013300-50500
813343-054003300-50900
823343-320003300-51300
834780-013004752-00800
843300-230003300-53400
853300-184004780-01500
864780-014003300-53600
873300-324003300-53700
883300-214003326-03701
893300-458003300-55600
903300-379003300-56100
913300-456003300-56500
923300-457004780-00202
933300-505004786-01600
943300-509004780-01700
953300-699003300-56200
963300-423003300-58100
973300-377003343-45500
983300-391003300-57400
993300-454003300-59000
1003300-486003300-59500
1013300-507003300-60500
1023300-513003343-51100
1033300-726003343-51500
1043300-45100 NR3343-51600
1053343-579003300-63200
1063343-036013300-64800
1074580-001003300-64900
1083300-74300 NR4214-00000
1094581-001004214-59623
1103328-034013343-52600
1113326-045003343-52700
1123328-037013300-63400
1133300-339003343-52800
1144780-020013300-63300
1154780-020023343-53500
1164780-020043343-53600
1174780-020063300-63700
1184780-020003300-68200
1194780-020033300-67300
1203300-411003300-64400
1213300-419003300-68100
1223300-428003300-64300
1233300-341004768-00200
1243300-227003300-70000
1254214-207043300-68000
1263300-193004780-01301
1273343-581004780-01401
1283300-323003347-00105
1293300-633003347-00110
1303300-637003300-67000
1313326-022004780-01501
1323328-005033300-70400
1334780-015003343-59300
1343300-648003300-67100
1354780-015013343-60400
1363328-016013300-68600
1373328-016003300-70600
1383300-205003300-71700
1393326-021003300-72900
1403300-417003300-74300
1413326-102003300-74400
1423343-400003300-70800
1433328-03501
1443326-02400
1453300-45400 NR
1463347-00110
1473328-03500
1484470-00300
1494470-00200
1504470-00301
1514214-59612
1523326-00201
1533326-00202
1543326-00301
1553326-00302
1563300-42200
1573300-43000
1583300-43200
1593300-43300
1603300-63200
1613328-00502
1623343-00901
1633300-25900
1643300-56200
1653326-05300
1664214-69501
1673328-02901
1683300-26500
1694214-60910
1703300-25800
1713326-00200
1723326-00300
1733326-03000
1743328-02902
1753300-24900
1763300-11700
1773343-02401
1783328-02900
1793343-26800
1803300-55600
1813300-56100
1823343-07501
1833300-35000
1843326-08200
1854780-00101
1864780-00102
1874780-00104
1883328-02001
1893300-45100
1903328-02000
1913328-03700
1923326-05200
1933328-00201
1943300-50800
1953328-02601
1963328-02801
1973328-02600
1983328-02800
1993300-65500
2003300-43400
2013326-02401
2024214-67500
2033300-53400
2043328-01001
2053300-34900
2064780-02300
2074214-62904
2083328-01101
2093328-01100
2103343-57100
2113300-57400
2123326-03701
2133300-21500
2144214-69500
2154780-01901
2163300-72000
2174780-01900
2183343-41700
2193343-62500
2203343-17301
2213326-04900
2223300-39700
2234780-00200
2244780-00202
2253300-22800
2263300-32200
2273300-33800
2284168-02900
2294786-01600
2303300-19800
2313300-31300
2323343-42600
2333300-36000
2343300-34000
2353300-71800
2363343-62900
2373343-62900 NR
2383300-35700
2393300-35800
2403300-36100
2414214-44905
2423343-58200
2433300-62300
2443343-59400
2453300-35900
2463300-14200
2473300-53700
2483343-45500
2493328-02300
2503328-02301
2513328-02501
2523328-01501
2533328-02500
2543300-69400
2553326-03200
2563326-04700
2573300-69200
2583328-02201
2593300-72100
2604597-00100
2613300-52600
2623300-72100 NR
2633326-09200
2643347-00103
2653347-00104
2663347-00105
2673347-00106
2683347-00107
2693347-00109
2704780-01804
2714780-01805
2723328-02200
2734780-01802
2744780-01803
2753300-32800
2763328-02002
2773343-10301
2783326-03001
2793326-03401
2803326-03501
2813326-03901
2823300-18600
2833328-01300
2843326-08300
2853300-18500
2863300-27300
2873328-01500
2883326-10900
2893300-58300
2903300-39000
2914581-00101
2923343-30200
2933300-29400
2943300-62100
2954780-01800
2963343-54300
2973326-03900
2983343-53700
2993300-25400
3003328-00702
3013328-00700
3023300-08600
3033328-00703
3044100-04203
3053343-54200
3063343-37800
3073343-37600
3083343-53100
3093343-53200
3103300-60500
3113300-64900
3124214-59623
3133343-41900
3143343-43500
3153300-37800
3163326-01500
3173328-03100
3183328-00802
3193300-52700
3203300-59500
3213300-37100
3224470-00104
3234470-00105
3243300-06000
3254780-01700
3263300-56500
3273300-35100
3283326-08000
3293343-37400
3303328-00701
3313343-01701
3323343-08901
3333300-38400
3343328-00803
3353328-01002
3363328-03101
3373300-27400
3383343-52900
3393343-53800
3403343-53900
3413343-54000
3423328-03102
3433328-03103
3443328-01003
3453328-00800
3463328-01000
3473300-42700
3483343-36800
3493328-03302
3503328-03301
3513300-26200
3523328-03300
3534786-01601
3544786-01602
3553300-17300
3563328-00301
3573328-03402
3583343-44700
3593326-10600
3604780-00100
3613343-30400
3624780-01801
3634780-00201
3643328-00300
3653343-41600
3664599-01100
3674780-02100
3684780-02200
3693300-74400 NR
3703328-03400
3713326-03700
3723343-44500
Sheet1083
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:A372Expression=COUNTIF(B:B,A1)textNO
 
Upvote 0
The formula must look at the first row in the applies to range.
So either Change A2 to A1 or change the applies to range to start at row2
Typo on my part. The equation as shown at the bottom of the XL2BB embedded sheet is starting at A1.
 
Upvote 0
Hi,

Aside from matching the Start cell in the formula, why not use Just COUNTIF ?
I just plugged the COUNTIF formula into the actual sheet and got the same results as the prior formula that is missing values, the 3300-51300 example specifically. Yours shows that highlighted though, so now I am further confused.
 
Upvote 0
Actually, it is B82 and A102
In an empty cell on your sheet, enter:

=B82=A102

Is it TRUE ?
 
Upvote 0
When you select all or part of column A to apply the CF to, be sure that the active cell (A1 using your test data as I copied it) is what appears in the CF formula as first argument for MATCH. Then try this CF formula.

=ISNUMBER(MATCH(A1,$B:$B,0))

By the way, VLOOKUP may give unexpected results when the range is not sorted.

Hope that helps.

Regards,
Ken
 
Upvote 0
Solution
You don't actually need the isnumber & can just use.
Excel Formula:
=MATCH(A1,$B:$B,0)
 
Upvote 0

Forum statistics

Threads
1,223,905
Messages
6,175,297
Members
452,633
Latest member
DougMo

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