View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Paul B Paul B is offline
external usenet poster
 
Posts: 709
Default Macro to delete row if value in column J =0

annep, just add the name to the bottom of the macro, like this,

Sub DeleteJisZero()

Dim lastrow As Long, r As Long

lastrow = Cells(Rows.Count, "J").End(xlUp).Row

For r = lastrow To 2 Step -1
If Cells(r, "J") = 0 Then
Rows(r).EntireRow.Delete
End If
Next r
ExportGLTrans
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"annep" wrote in
message ...

Works very nice.
I have another question.
How can I combine the two macros?
I would like for this macro to complete and then run my other macro,
which is Sub ExportGLTrans()?
Thanks,
Anne


--
annep
------------------------------------------------------------------------
annep's Profile:

http://www.excelforum.com/member.php...o&userid=18851
View this thread: http://www.excelforum.com/showthread...hreadid=497087