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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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,213,504
Messages
6,114,020
Members
448,543
Latest member
MartinLarkin

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