Compare values

E

excel learner

Hi All,

I'd really appreciate if someone from the group can please help me get
through this question. I've 4 columns viz A, B, C & D and here's what
I need to do:

1) I've to check values in column A against column C and values in
column B against column D. If the values match then simply leave
things as is. However if the values in column A are different then
values in column C or values in column B are different then values in
column D then output that record to a different sheet.

Can someone please help me w/the programming so that I can get the
desired outcome?

Thanks in advance!
 
D

Dave Peterson

I wouldn't bother with a macro. I'd use some formulas and autofilter.

I would add headers to row 1 (if you don't have them already).

Then I'd add a formula to E2:
=and(a2=c2,b2=d2)
and drag it down as far as I needed.

This formula will return TRUE if column A matches column C and column B matches
column D (of the same row).

Then add the autofilter to column E.
Select column E
Data|Autofilter
(in xl2003 menus)

Show the FALSE values and copy those visible rows (only columns A:D) to the new
sheet.

If I needed a macro, I'd start by recording one when I applied this same technique.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top