View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 67
Default Delete record if cell is empty

sub deleterow
dim cou as double
for cou = activesheet.usedrange.rows.count to 1 step-1
if activesheet.range("Q"&cou) = "" then _
activesheet.rows(cstr(cou)).delete
next
end sub
--
When you lose your mind, you free your life.
Ever Notice how we use '' for comments in our posts even if they aren''t
expected to go into the code?


"Metrazal" wrote:


I need the code to delete a record/row if cell Q (of that record/row) is
empty.

What would be the best way to achieve this?

Thanks,

Met


--
Metrazal
------------------------------------------------------------------------
Metrazal's Profile: http://www.excelforum.com/member.php...o&userid=31648
View this thread: http://www.excelforum.com/showthread...hreadid=514900