Hi,
I'm using Excel 2013. I'm looking for a VBA macro solution.
I want to find blank cells in column G and column N. If the cells in both these columns are empty, I want to delete the entire row. How do I do this via a macro?
The logic is explained below.
Cell g13 is blank, cell n13 is blank. Therefore delete row 13.
Cell g25 contains data, cell n25 is blank. Don't do anything (move on to the next row).
Cell g4 contains data, cell n4 contains data. Don't do anything (move on to the next row).
Therefore, the logic is if either one or both cells in column G and column N along the same row contain data, don't do anything. If both cells in column G and column N along the same row are blank, delete that row.
Could you show me the code please?
Thanks.
I'm using Excel 2013. I'm looking for a VBA macro solution.
I want to find blank cells in column G and column N. If the cells in both these columns are empty, I want to delete the entire row. How do I do this via a macro?
The logic is explained below.
Cell g13 is blank, cell n13 is blank. Therefore delete row 13.
Cell g25 contains data, cell n25 is blank. Don't do anything (move on to the next row).
Cell g4 contains data, cell n4 contains data. Don't do anything (move on to the next row).
Therefore, the logic is if either one or both cells in column G and column N along the same row contain data, don't do anything. If both cells in column G and column N along the same row are blank, delete that row.
Could you show me the code please?
Thanks.