VBA Code Needed - Compare Cells in a Column to Cells in Previous Column
Posted on 2011-02-17
I have what seems to be a very simple request. I need to know how the VBA code would look if I wanted to compare values of cells in a column to values of cells in another column using the offset property.
A B C D
1 2 3 4
2 3 4 5
3 4 5 6
4 5 6 7
I want to go down each column, starting with B, and compare it to the cell's offset of 1 column over (-1). This comparison would obviously need to be 1 cell at a time, but needs to be relative so that I can run this macro on any column. Preferably this would go down the entire column until it reaches null cell.