delete formula

J

jason2444

have a file with dollar amounts in two columns.
column A1 and column B1
want to match the prices in A1 to B1 and delete all the prices in column A1
that are the same in column B1
if the prices in column A1 is different than column B1 want to leave alone.
 
B

Bob Phillips

The whole row

For i = Cells(Rows.Count,"A").End(xlUp).Row to 1 Step -1
If Cells(i,"A").Value = Cells(i,"B").Value Then
Rows(i).delete
End If
N ext i

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

jason2444 said:
have a file with dollar amounts in two columns.
column A1 and column B1
want to match the prices in A1 to B1 and delete all the prices in column A1
that are the same in column B1
if the prices in column A1 is different than column B1 want to leave
alone.
 
B

Bob Phillips

It's not a formula, it is VBA. Put it in a macro, then run the macro.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Top