Finding matching values

Nanditha

New Member
Joined
May 28, 2021
Messages
10
Office Version
  1. 2013
Platform
  1. Windows
Hi friends… I am looking at your expertise in the below.
I have 2 excel worksheets (dnd and cc5). I have a set of values (text) in column A. I need to highlight the matching values between sheet dnd (column A) and cc5 (column P) in green text in column P.
I used the below command but it only finds the values which is in A4. Rest of the row values are not getting highlighted.

Sheets(“dnd”).Select
Range(“A3”).Select

For Each cell in Test.columns(“A”).cells.specialcells(xlcelltypevisible)

selection.offset(1,0).select
Sheets(“cc5”).select
Cells.find(what:=sheets(“dnd”).range(“A4”),searchdirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate

can someone help me to correct the code which is match all values in column A with cc5 sheet column P.
Thanks a lot for your help!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
You have a typo, it should be Rows not Row
 
Upvote 0
Oops I have corrected it and it works fine. Thank you soo much for your help!
You have a typo, it should be Rows not Row
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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