Thread: Delete Row
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Delete Row

On Apr 18, 9:48 am, wrote:
Hi
If Application.Worksheetfunctions.Counta(Range("A:A") ) = 0 then
Selection.EntireRow.Delete
Else
Msgbox "Unable to Delete this Row!"
End if

If your column A contains a formula which returns empty text "" then
that will also be counted, even though the cell looks empty, so just
be careful with that.
regards
Paul

Hi
I read your problem slightly differently to Norman Jones, but his
interpretation is probably correct. My response assumes you want to
delete when ALL of column A is empty. His assumes you want to delete
when the cell in column A for that row is empty.
regardfs
Paul


On Apr 18, 9:36 am, Karen McKenzie



wrote:
I want to be able to run a macro which will delete the row selected if column
A is blank. If it is not blank then message box "Unable to delete this row!"
I've looked through code already available but can't find anything that does
this.
Could someone please help.- Hide quoted text -


- Show quoted text -