ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   delete formula (https://www.excelbanter.com/excel-discussion-misc-queries/98868-delete-formula.html)

jason2444

delete formula
 
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.

Bob Phillips

delete formula
 
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" wrote in message
...
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.



jason2444

delete formula
 
how do I run this formula where do i type it in at?

"Bob Phillips" wrote:

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" wrote in message
...
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.




Bob Phillips

delete formula
 
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)

"jason2444" wrote in message
...
how do I run this formula where do i type it in at?

"Bob Phillips" wrote:

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" wrote in message
...
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.







All times are GMT +1. The time now is 12:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com