p4uk80
(Praveen)
1
Hi,
Can I delete all blank sheets from my excel workbook on some contion.
Lets Say I am having 10 sheets in my workbook and I need to delete all sheets
having blank Cell D22.
Few of the sheets from workbook are having blank cells and I want to delete all those.
Sub TestCellD22()
'Test if the value is cell D22 is blank/empty
If IsEmpty(Range(“D22”).Value) = True Then
MsgBox “Cell D22 is empty”
End If
End Sub
Hello, you can use Read Range Activity on each sheet and if the datatable has no rows you can delete it.
For deleting, you can use this code
Or send three hotkeys: Alt+h then d finaly ctrl+s.