View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Automatically Removing Rows where Cells A:R are Blank

That is because it works on rows like the OP Asked.

--
Regards,
Tom Ogilvy

"Thulasiram" wrote in message
ups.com...
I dont find any rows or columns that hide using this code. I pasted the
given code in a separate command button like this. i had column E that
was empty

Please help

Chip Pearson wrote:
Try something like the following:


Dim RowNum As Long
RowNum = 1 ' change as required
If Application.CountA(Range(Cells(RowNum, "A"), _
Cells(RowNum, "R"))) = 0 Then
Rows(RowNum).Delete
End If



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"DukeDevil" wrote in message
oups.com...
Hello,

I have a whole bunch of data that I keep mooving between
sheets.
Sometimes I forget to delete the row once I have moved it. Is
there any
sort of VBA code that I can write that recognizes when cells A
to R are
BLANK and then automatically deletes the row? Please let me
know.

Thank you.