Cell Value Comparison IF/THEN Situation

[Closed]
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,

I am tryong to write a macro that will compare the value in cell 1 (ACTIVE CELL) with the cell below (ACTIVE CELL OFFSET (0,1). If the amounts match, I want to delete the values in each cells. If the cell values do not match I want to leave them alone.

This loop can run for an arbitraty number of times...this I can handle, but the comparing I am not yet understanding.

Signed,
Struggling Beginner At VBA


1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
What do you mean by Active cell. Did you mean active cell or did you meant that If cell value matches the cell value below it, then clear out values of both cells. In this case what if

A1: 12
A2: 12
A3: 12

Now since A1 value matches A2, we remove A1 and A2 value. What abuot A3