identify & apply cond format to particular values in a l

Kat81

New Member
Joined
Mar 14, 2003
Messages
7
Hi guys,

hoping you can help me with this!

If I have a list of values (phone numbers) in column A and on a separate sheet (sheet 2) I have a list of phone numbers that I want to find and highlight the occurences of in the list on the first sheet (column A).

Is there a way that I can run a macro that will search the list on sheet 1 for the values contained in the list on sheet 2 and then apply conditional formatting to those values which occur on both sheets?

Any suggestions would be GREATLY appreciated! If I need to be more clear please let me know. It makes perfect sense to me but I am blonde. :wink:

Thanks!

Kat :biggrin:
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

Why the need for VB, why not just use CONDITIONAL FORMATTING?

You will neeed to name the two columns, the use

=MATCH(A1,sheet1,0)

and format as required

where sheet1 is one of the named ranges, use the same formula for the second sheet, but using a different named range.
 

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
Hi Kat

Do you really need to use a macro? Using a simple formula such as:

=ISNUMBER(MATCH(Sheet1!A2,Sheet2!$A$2:$A$1000,0))

will return True/False depending on whether a match is found. You could then use Autofilter to filter out the False values to just leave you with the Trues ie the numbers that exist on both sheets.

Does this help?

Richard
 

Kat81

New Member
Joined
Mar 14, 2003
Messages
7
Thanks guys!!!

Both suggestions worked a treat! (y)

Thanks so much for the prompt and very helpful responses!!!!

have a great weekend!! :biggrin:

Kat
 

Forum statistics

Threads
1,141,096
Messages
5,704,312
Members
421,338
Latest member
Pepess

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
Top