We help IT Professionals succeed at work.
Get Started

Macro VBA excel to validate 2 sheets

Last Modified: 2014-05-17

I have an excel file with 2 sheets
Sheet1 and Sheet2.

What i would like to do is a macro that would validate the 3 first column of all the rows in Sheet1 compare to the same rows and column on Sheet2.

Sheet1. row 1 Column A: Ted
Sheet1. row 1 Column B: 2
Sheet1. row 1 Column C: Golf

In Sheet2. row 1 Column A: Ted
Sheet2. row 1 Column B: 6
Sheet2. row 1 Column C: Golf

The result i want would show in Sheet3 in the same row number in the 3 columns
Sheet2. row 1 Column A: Pass
Sheet2. row 1 Column B: Fail
Sheet2. row 1 Column C: Pass

So since Row 1 column A on Sheet1 and Sheet2 are equal, that the result is: PASS
Since  Row 1 column B on Sheet1 and Sheet2 are not equal, than the result should be: FAIL ...

I may have 30000 rows of data in both Sheets.

How can i do that?

Thanks again for your help
Watch Question
This problem has been solved!
Unlock 3 Answers and 16 Comments.
See Answers
Why Experts Exchange?


Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question


  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?
