We help IT Professionals succeed at work.
Get Started

Macro VBA excel to validate 2 sheets

825 Views
Last Modified: 2014-05-17
Hi

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.

Ex:
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
Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 3 Answers and 16 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

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

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE