Deleting Cells with Duplicates

S

Steve O

Hello,

I have two columns with numbers. I want to delete cells in both columns if
the data is matched. Here's an example Column A is Amount1 and Column B is
Amount2

Amount1 Amount2
35 1
48 18
21 26
12 48
16 3
39 4
2 21
0.5 13

If the amount exists in column a and b then I want both cells to be deleted
in both columns.

Thanks for the help.
Steve
 
S

Sheeloo

1. Put this in C2 and copy down;
=IF(A2=B2,"Same","")

2. Filter on Same, Edit->Go To->Special->Visible Cells Only and Delete...
 
S

Steve O

Thanks, but I'm looking for VBA code to delete the cells, I know the code if
A2 = B2, but what I can't get to work is holding the value in A3 (48) and
deleting the cell in B5 (48) the match and then deleting A3 and move on to
the next value in col A.
 
D

dan dungan

Steve,

Back on October 2nd, there was a thread that seemed similar to your
request. The subject was
"Compare & align like items from 2 Roaster columns of Employees."

Maybe that will help.

Dan
 

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