For. .Next loop to compare two columns in different worksheets?

RCrewHelp

New Member
Joined
Oct 24, 2021
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
I am an intermediate Excel user with beginner skills in vba.

I have three spreadsheets containing columns of data to compare.
Sheet1.Column# compares against Sheet2.Column# and returns the value of Sheet2.Column##.
The values returned from the first For. .Next loop are then passed into a 2nd For. .Next loop to compare to a column in Sheet3.Column#

I have three spreadsheets containing columns of data to compare.
I believe I need to execute multiple For..Next loops.
I need the 1st loop to take values from Sheet1.Column# and compare them against Sheet2.Column#, and return the values of Sheet2.Column## for all TRUE conditions.
I then need to Pass those returned values into a 2nd For. .Next loop to compare against data in a column in Sheet 3, returning the entire record for any comparisons that have a False condition.

I also think I need to have a Row variable that works from a counter variable "i" that is incremented to execute the comparison statement for each successive row of Sheet 1.Column 1 against the Sheet 2.Column 1 values.

I really need help in writing the code for this procedure.
Please Help.
.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,214,947
Messages
6,122,413
Members
449,082
Latest member
tish101

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