A function can do one thing: it can return a value.
It cannot format, it cannot copy/paste, delete.insert, on any other Excel
feature
Do you wish to delete all rows in a worksheet when the A cell is empty?
A VBA subroutine can do this; let us know exactly what you need
best wishes