Two columns one check

Brown

Board Regular
Joined
Sep 14, 2009
Messages
198
Office Version
  1. 365
Good morning,
Thank you for your help, in advance.

I have a need and I will do my best to describe it.

I have two columns C and M with data i am getting from a Macro I run.

How can I find out if ID Numbers in column C match an ID Number in M?
Is there was way, conditional formatting comes to mind but i know that wont work for separate columns.

Thanks for the information.

If i am being unclear I will do a better job of explaining.

Brown
 
Conditional Formatting pertains to the range that you apply it to, so it would only apply to the range on the one sheet you set it up on.
However, if you want the EXACT same Conditional Formatting rule on the EXACT same range on each worksheet, simply turn on the Macro Recorder, and record yourself setting the rule on any one worksheet. The stop the Macro Recorder.

Then, you can go to each page, and simply run the recorded Macro you created, and it will set that Conditional Formatting on that page.

Or, if you wanted to get really clever, after you have recorded you Macro, you can edit it.
Put this at the very top of your Recorded Macro, after the "Sub Macro1()" line:
VBA Code:
    Dim ws As Worksheet
    For Each ws In Worksheets
    ws.Activate
And then put this at the end, just before the "End Sub" line:
VBA Code:
Next ws
This will loop through each sheet in your workbook to apply your recorded Macro to each sheet, so you only need to run the Macro once to apply it to all worksheets in your workbook.
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,215,366
Messages
6,124,516
Members
449,168
Latest member
CheerfulWalker

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