Juddman79
New Member
- Joined
- Feb 17, 2020
- Messages
- 31
- Office Version
- 2016
- Platform
- Windows
Evening all,
I'm hoping that somebody might be able to help with some VBA code to clear cells if a specific (date) cell is blank. I have 2 worksheets that are set up differently but I need the same thing to happen in both sheets.
Sheet 1 (VBA code 1)
E7 - E24 are cells filled with dates from another sheet. I need a some coding that clears the cells in alternative columns (G7, I7, K7, M7 etc until cell BE7) along the row if the E cell is blank. Cells H7, J7, L7 etc are formulas that calculate expected due dates based on the date in cell E7 so will be protected once the sheet is complete. There will not be a password protecting the sheet.
Sheet 2 (VBA Code 2) (Image below)
If Column F has no date in the cell then cells in the completed Date and Result Rows are cleared. so if there is no date in F3 then the cells from J4 and J5 through to DE4 and DE5 are cleared.
The same would need to apply for the dates entered in Column F down to F54 to clear J64 and J65 through to DE64 and DE65.
Hope this makes sense.
I've looked at older threads but haven't found anything that works so any help is really appreciated. Many thanks
I'm hoping that somebody might be able to help with some VBA code to clear cells if a specific (date) cell is blank. I have 2 worksheets that are set up differently but I need the same thing to happen in both sheets.
Sheet 1 (VBA code 1)
E7 - E24 are cells filled with dates from another sheet. I need a some coding that clears the cells in alternative columns (G7, I7, K7, M7 etc until cell BE7) along the row if the E cell is blank. Cells H7, J7, L7 etc are formulas that calculate expected due dates based on the date in cell E7 so will be protected once the sheet is complete. There will not be a password protecting the sheet.
Sheet 2 (VBA Code 2) (Image below)
If Column F has no date in the cell then cells in the completed Date and Result Rows are cleared. so if there is no date in F3 then the cells from J4 and J5 through to DE4 and DE5 are cleared.
The same would need to apply for the dates entered in Column F down to F54 to clear J64 and J65 through to DE64 and DE65.
Hope this makes sense.
I've looked at older threads but haven't found anything that works so any help is really appreciated. Many thanks