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

Anne,

Try 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

End Sub

HTH

"annep" wrote:


I export data from Quickbooks into excel. Quickbooks unfortunately does
not let me filter the data with two variable, because if should be <0.
In Quickbooks you can only filter on = or or <.
So I export this huge data block into excel to then import into
access.

When the data is imported into access, I run a macro which massages the
data into a format access can use.
I now have more then 10,000 rows to copy and it has reached the limit
of some of the computers memory.
Out of the 10,000 or more transactions, there are more 4,000 items with
the value of zero, which I can get rid of.
I would like to be able to add some lines to go through the rows and
delete all rows where the value in column J=0.
Thank for any help.
Anne


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