Hello All,
This is my first post here. I hope someone will be able to help.
I would like to be able to write a macro which will clear the contents of two cells (say L2 and M2), if another cell (say O2) is blank. If the other cell is not blank, I would like to leave the first cell as it is. I want to do this for every row in my spreadsheet (I have about 250 rows in my spreadsheet but that is not fixed).
I can think of what I would like to do in my head, but not what sort of macro would help me do it. As you may have guessed, I am very new to this. This is what I would like to achieve
Set a row count (i) to 2 (my data starts at row 2)
Loop while cell L(i) is not blank
If Cell O(i) is blank
Set cells L(i) and M(i) to blank
Else
Do nothing
add 1 to my row count
end loop
I hope this makes sense - I have attached a pic of the data which I hope will make it more clear
Many thanks
AlysExcel Problem.PNG
Bookmarks