Cell Value Comparison IF/THEN Situation

Closed
No Hair Left - Jul 22, 2010 at 12:15 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 22, 2010 at 01:38 PM
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 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jul 22, 2010 at 01:38 PM
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
0