I have a macro-enabled workbook in which I want to delete the vales from cells in one column based on values in another column. This example should make my meaning clearer:
DeleteValues.png
I want to delete values in the left column if the values in the right column are > 20 or < 0 so that, in this case, the last value in the left column would be 12.40 The data is such that the values in the two columns are always in ascending order.
One possible approach (which I have not been able to implement) might be to find the row number (N) of the first cell in the second column which meets the criteria (> 20 or <0) and then set the range to be deleted to be "A" & N & ":A" - assuming the left column is "A"
Bookmarks