Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default TABLE filter net zero amounts

Hi,

I want to remove all zero balance in the file.
File: http://savefile.com/files/1618048


Thx.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default TABLE filter net zero amounts

Columns("F").AutoFilter _
field:=1, _
Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete


"Sinner" wrote:

Hi,

I want to remove all zero balance in the file.
File: http://savefile.com/files/1618048


Thx.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default TABLE filter net zero amounts

On Jun 19, 8:11*pm, Joel wrote:
Columns("F").AutoFilter _
* * field:=1, _
* * Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete



"Sinner" wrote:
Hi,


I want to remove all zero balance in the file.
File:http://savefile.com/files/1618048


Thx.- Hide quoted text -


- Show quoted text -


Thx for the reply Joel.
Still the numbers with comulative zero in columnF are there like
(-2000) & (+2000) for same entities.
Do we have to fill the blank# cells in columnA first & then make a
temp column to offset the balances & remove balances that are zero?

Waiting for reply.
Thx.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default TABLE filter net zero amounts

The code was more complicated than I originally expected

Sub removerows()

Columns("F").AutoFilter _
field:=1, _
Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete

FirstRow = 1
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
NextID = Range("A" & (RowCount + 1))
If NextID < "" Then
If ID < NextID Then
'sum the rows from FirstRow to present Row
Set SumRange = Range(Range("F" & FirstRow), _
Range("F" & RowCount))
Total = WorksheetFunction.Sum(SumRange)

If Total = 0 Then
Rows(FirstRow & ":" & RowCount).Delete
RowCount = FirstRow
Else
RowCount = RowCount + 1
FirstRow = RowCount
End If
ID = Range("A" & RowCount)
End If
Else
RowCount = RowCount + 1
End If
Loop
End Sub

"Sinner" wrote:

On Jun 19, 8:11 pm, Joel wrote:
Columns("F").AutoFilter _
field:=1, _
Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete



"Sinner" wrote:
Hi,


I want to remove all zero balance in the file.
File:http://savefile.com/files/1618048


Thx.- Hide quoted text -


- Show quoted text -


Thx for the reply Joel.
Still the numbers with comulative zero in columnF are there like
(-2000) & (+2000) for same entities.
Do we have to fill the blank# cells in columnA first & then make a
temp column to offset the balances & remove balances that are zero?

Waiting for reply.
Thx.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default TABLE filter net zero amounts

On Jun 19, 10:55*pm, Joel wrote:
The code was more complicated than I originally expected

Sub removerows()

Columns("F").AutoFilter _
* * field:=1, _
* * Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete

FirstRow = 1
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
* *NextID = Range("A" & (RowCount + 1))
* *If NextID < "" Then
* * * If ID < NextID Then
* * * * *'sum the rows from FirstRow to present Row
* * * * *Set SumRange = Range(Range("F" & FirstRow), _
* * * * * * Range("F" & RowCount))
* * * * *Total = WorksheetFunction.Sum(SumRange)

* * * * *If Total = 0 Then
* * * * * * Rows(FirstRow & ":" & RowCount).Delete
* * * * * * RowCount = FirstRow
* * * * *Else
* * * * * *RowCount = RowCount + 1
* * * * * *FirstRow = RowCount
* * * * *End If
* * * * *ID = Range("A" & RowCount)
* * * End If
* *Else
* * * RowCount = RowCount + 1
* *End If
Loop
End Sub



"Sinner" wrote:
On Jun 19, 8:11 pm, Joel wrote:
Columns("F").AutoFilter _
* * field:=1, _
* * Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete


"Sinner" wrote:
Hi,


I want to remove all zero balance in the file.
File:http://savefile.com/files/1618048


Thx.- Hide quoted text -


- Show quoted text -


Thx for the reply Joel.
Still the numbers with comulative zero in columnF are there like
(-2000) & (+2000) for same entities.
Do we have to fill the blank# cells in columnA first & then make a
temp column to offset the balances & remove balances that are zero?


Waiting for reply.
Thx.- Hide quoted text -


- Show quoted text -


Thx Joel for the concern.
The code however is dowing two unusual things.

-Deleting the header row.
-Each time I run the macro, it is deleting a row from remaining data
for no reason.

Hope you can fix that.

Thx alot once again.
Waiting for reply.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default TABLE filter net zero amounts

The microsoft Autofilter wasn't working correctly. I got rid of it and did
the deletes in my code.

Sub removerows()

FirstRow = 2
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
Grandtotal = Range("F" & RowCount)
If Grandtotal = 0 Then
Rows(RowCount).Delete
Else
NextID = Range("A" & (RowCount + 1))
If NextID < "" Then
If ID < NextID Then
'sum the rows from FirstRow to present Row
Set SumRange = Range(Range("F" & FirstRow), _
Range("F" & RowCount))
Total = WorksheetFunction.Sum(SumRange)

If Total = 0 Then
Rows(FirstRow & ":" & RowCount).Delete
RowCount = FirstRow
Else
RowCount = RowCount + 1
FirstRow = RowCount
End If
ID = Range("A" & RowCount)
End If
Else
RowCount = RowCount + 1
End If
End If
Loop
End Sub


"Sinner" wrote:

On Jun 19, 10:55 pm, Joel wrote:
The code was more complicated than I originally expected

Sub removerows()

Columns("F").AutoFilter _
field:=1, _
Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete

FirstRow = 1
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
NextID = Range("A" & (RowCount + 1))
If NextID < "" Then
If ID < NextID Then
'sum the rows from FirstRow to present Row
Set SumRange = Range(Range("F" & FirstRow), _
Range("F" & RowCount))
Total = WorksheetFunction.Sum(SumRange)

If Total = 0 Then
Rows(FirstRow & ":" & RowCount).Delete
RowCount = FirstRow
Else
RowCount = RowCount + 1
FirstRow = RowCount
End If
ID = Range("A" & RowCount)
End If
Else
RowCount = RowCount + 1
End If
Loop
End Sub



"Sinner" wrote:
On Jun 19, 8:11 pm, Joel wrote:
Columns("F").AutoFilter _
field:=1, _
Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete


"Sinner" wrote:
Hi,


I want to remove all zero balance in the file.
File:http://savefile.com/files/1618048


Thx.- Hide quoted text -


- Show quoted text -


Thx for the reply Joel.
Still the numbers with comulative zero in columnF are there like
(-2000) & (+2000) for same entities.
Do we have to fill the blank# cells in columnA first & then make a
temp column to offset the balances & remove balances that are zero?


Waiting for reply.
Thx.- Hide quoted text -


- Show quoted text -


Thx Joel for the concern.
The code however is dowing two unusual things.

-Deleting the header row.
-Each time I run the macro, it is deleting a row from remaining data
for no reason.

Hope you can fix that.

Thx alot once again.
Waiting for reply.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default TABLE filter net zero amounts

On Jun 20, 2:21*am, Joel wrote:
The microsoft Autofilter wasn't working correctly. *I got rid of it and did
the deletes in my code.

Sub removerows()

FirstRow = 2
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
* *Grandtotal = Range("F" & RowCount)
* *If Grandtotal = 0 Then
* * * Rows(RowCount).Delete
* *Else
* * * NextID = Range("A" & (RowCount + 1))
* * * If NextID < "" Then
* * * * *If ID < NextID Then
* * * * * * 'sum the rows from FirstRow to present Row
* * * * * * Set SumRange = Range(Range("F" & FirstRow), _
* * * * * * * *Range("F" & RowCount))
* * * * * * Total = WorksheetFunction.Sum(SumRange)

* * * * * * If Total = 0 Then
* * * * * * * *Rows(FirstRow & ":" & RowCount).Delete
* * * * * * * *RowCount = FirstRow
* * * * * * Else
* * * * * * * *RowCount = RowCount + 1
* * * * * * * *FirstRow = RowCount
* * * * * * End If
* * * * * * ID = Range("A" & RowCount)
* * * * *End If
* * * Else
* * * * *RowCount = RowCount + 1
* * * End If
* *End If
Loop
End Sub



"Sinner" wrote:
On Jun 19, 10:55 pm, Joel wrote:
The code was more complicated than I originally expected


Sub removerows()


Columns("F").AutoFilter _
* * field:=1, _
* * Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete


FirstRow = 1
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
* *NextID = Range("A" & (RowCount + 1))
* *If NextID < "" Then
* * * If ID < NextID Then
* * * * *'sum the rows from FirstRow to present Row
* * * * *Set SumRange = Range(Range("F" & FirstRow), _
* * * * * * Range("F" & RowCount))
* * * * *Total = WorksheetFunction.Sum(SumRange)


* * * * *If Total = 0 Then
* * * * * * Rows(FirstRow & ":" & RowCount).Delete
* * * * * * RowCount = FirstRow
* * * * *Else
* * * * * *RowCount = RowCount + 1
* * * * * *FirstRow = RowCount
* * * * *End If
* * * * *ID = Range("A" & RowCount)
* * * End If
* *Else
* * * RowCount = RowCount + 1
* *End If
Loop
End Sub


"Sinner" wrote:
On Jun 19, 8:11 pm, Joel wrote:
Columns("F").AutoFilter _
* * field:=1, _
* * Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete


"Sinner" wrote:
Hi,


I want to remove all zero balance in the file.
File:http://savefile.com/files/1618048


Thx.- Hide quoted text -


- Show quoted text -


Thx for the reply Joel.
Still the numbers with comulative zero in columnF are there like
(-2000) & (+2000) for same entities.
Do we have to fill the blank# cells in columnA first & then make a
temp column to offset the balances & remove balances that are zero?


Waiting for reply.
Thx.- Hide quoted text -


- Show quoted text -


Thx Joel for the concern.
The code however is dowing two unusual things.


-Deleting the header row.
-Each time I run the macro, it is deleting a row from remaining data
for no reason.


Hope you can fix that.


Thx alot once again.
Waiting for reply.- Hide quoted text -


- Show quoted text -


Thx Joel. It works as was required.
One last bit if you can add.
After this macro ends & we have the desired table, is there a
possibility to remove a row for which there is value in cell in
columnE but corresponding columnD cell is blank. If you can add this
step in same macro but at the end of what it has done so far. Putting
it in start will vary the result.

Thx alot once again.
Waiting for reply.
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default TABLE offset net zero amounts using a macro (Joel)

On Jun 20, 2:47*am, Sinner wrote:
On Jun 20, 2:21*am, Joel wrote:





The microsoft Autofilter wasn't working correctly. *I got rid of it and did
the deletes in my code.


Sub removerows()


FirstRow = 2
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
* *Grandtotal = Range("F" & RowCount)
* *If Grandtotal = 0 Then
* * * Rows(RowCount).Delete
* *Else
* * * NextID = Range("A" & (RowCount + 1))
* * * If NextID < "" Then
* * * * *If ID < NextID Then
* * * * * * 'sum the rows from FirstRow to present Row
* * * * * * Set SumRange = Range(Range("F" & FirstRow), _
* * * * * * * *Range("F" & RowCount))
* * * * * * Total = WorksheetFunction.Sum(SumRange)


* * * * * * If Total = 0 Then
* * * * * * * *Rows(FirstRow & ":" & RowCount).Delete
* * * * * * * *RowCount = FirstRow
* * * * * * Else
* * * * * * * *RowCount = RowCount + 1
* * * * * * * *FirstRow = RowCount
* * * * * * End If
* * * * * * ID = Range("A" & RowCount)
* * * * *End If
* * * Else
* * * * *RowCount = RowCount + 1
* * * End If
* *End If
Loop
End Sub


"Sinner" wrote:
On Jun 19, 10:55 pm, Joel wrote:
The code was more complicated than I originally expected


Sub removerows()


Columns("F").AutoFilter _
* * field:=1, _
* * Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete


FirstRow = 1
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
* *NextID = Range("A" & (RowCount + 1))
* *If NextID < "" Then
* * * If ID < NextID Then
* * * * *'sum the rows from FirstRow to present Row
* * * * *Set SumRange = Range(Range("F" & FirstRow), _
* * * * * * Range("F" & RowCount))
* * * * *Total = WorksheetFunction.Sum(SumRange)


* * * * *If Total = 0 Then
* * * * * * Rows(FirstRow & ":" & RowCount).Delete
* * * * * * RowCount = FirstRow
* * * * *Else
* * * * * *RowCount = RowCount + 1
* * * * * *FirstRow = RowCount
* * * * *End If
* * * * *ID = Range("A" & RowCount)
* * * End If
* *Else
* * * RowCount = RowCount + 1
* *End If
Loop
End Sub


"Sinner" wrote:
On Jun 19, 8:11 pm, Joel wrote:
Columns("F").AutoFilter _
* * field:=1, _
* * Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete


"Sinner" wrote:
Hi,


I want to remove all zero balance in the file.
File:http://savefile.com/files/1618048


Thx.- Hide quoted text -


- Show quoted text -


Thx for the reply Joel.
Still the numbers with comulative zero in columnF are there like
(-2000) & (+2000) for same entities.
Do we have to fill the blank# cells in columnA first & then make a
temp column to offset the balances & remove balances that are zero?


Waiting for reply.
Thx.- Hide quoted text -


- Show quoted text -


Thx Joel for the concern.
The code however is dowing two unusual things.


-Deleting the header row.
-Each time I run the macro, it is deleting a row from remaining data
for no reason.


Hope you can fix that.


Thx alot once again.
Waiting for reply.- Hide quoted text -


- Show quoted text -


Thx Joel. It works as was required.
One last bit if you can add.
After this macro ends & we have the desired table, is there a
possibility to remove a row for which there is value in cell in
columnE but corresponding columnD cell is blank. If you can add this
step in same macro but at the end of what it has done so far. Putting
it in start will vary the result.

Thx alot once again.
Waiting for reply.- Hide quoted text -

- Show quoted text -


Hi Joel,
A minor last minute modification needed.

Waiting for reply.
Thx.
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default TABLE offset net zero amounts using a macro (Joel)

Sub removerows()

FirstRow = 2
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
Grandtotal = Range("F" & RowCount)
If Grandtotal = 0 Then
Rows(RowCount).Delete
Else
NextID = Range("A" & (RowCount + 1))
If NextID < "" Then
If ID < NextID Then
'sum the rows from FirstRow to present Row
Set SumRange = Range(Range("F" & FirstRow), _
Range("F" & RowCount))
Total = WorksheetFunction.Sum(SumRange)

If Total = 0 Then
Rows(FirstRow & ":" & RowCount).Delete
RowCount = FirstRow
Else
RowCount = RowCount + 1
FirstRow = RowCount
End If
ID = Range("A" & RowCount)
End If
Else
RowCount = RowCount + 1
End If
End If
Loop

RowCount = 2
Do While Range("F" & RowCount) < ""
If Range("D" & RowCount) = "" And _
Range("E" & RowCount) < "" Then

Rows(RowCount).Delete
Else
RowCount = RowCount + 1
End If

Loop

End Sub



"Sinner" wrote:

On Jun 20, 2:47 am, Sinner wrote:
On Jun 20, 2:21 am, Joel wrote:





The microsoft Autofilter wasn't working correctly. I got rid of it and did
the deletes in my code.


Sub removerows()


FirstRow = 2
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
Grandtotal = Range("F" & RowCount)
If Grandtotal = 0 Then
Rows(RowCount).Delete
Else
NextID = Range("A" & (RowCount + 1))
If NextID < "" Then
If ID < NextID Then
'sum the rows from FirstRow to present Row
Set SumRange = Range(Range("F" & FirstRow), _
Range("F" & RowCount))
Total = WorksheetFunction.Sum(SumRange)


If Total = 0 Then
Rows(FirstRow & ":" & RowCount).Delete
RowCount = FirstRow
Else
RowCount = RowCount + 1
FirstRow = RowCount
End If
ID = Range("A" & RowCount)
End If
Else
RowCount = RowCount + 1
End If
End If
Loop
End Sub


"Sinner" wrote:
On Jun 19, 10:55 pm, Joel wrote:
The code was more complicated than I originally expected


Sub removerows()


Columns("F").AutoFilter _
field:=1, _
Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete


FirstRow = 1
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
NextID = Range("A" & (RowCount + 1))
If NextID < "" Then
If ID < NextID Then
'sum the rows from FirstRow to present Row
Set SumRange = Range(Range("F" & FirstRow), _
Range("F" & RowCount))
Total = WorksheetFunction.Sum(SumRange)


If Total = 0 Then
Rows(FirstRow & ":" & RowCount).Delete
RowCount = FirstRow
Else
RowCount = RowCount + 1
FirstRow = RowCount
End If
ID = Range("A" & RowCount)
End If
Else
RowCount = RowCount + 1
End If
Loop
End Sub


"Sinner" wrote:
On Jun 19, 8:11 pm, Joel wrote:
Columns("F").AutoFilter _
field:=1, _
Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete


"Sinner" wrote:
Hi,


I want to remove all zero balance in the file.
File:http://savefile.com/files/1618048


Thx.- Hide quoted text -


- Show quoted text -


Thx for the reply Joel.
Still the numbers with comulative zero in columnF are there like
(-2000) & (+2000) for same entities.
Do we have to fill the blank# cells in columnA first & then make a
temp column to offset the balances & remove balances that are zero?


Waiting for reply.
Thx.- Hide quoted text -


- Show quoted text -


Thx Joel for the concern.
The code however is dowing two unusual things.


-Deleting the header row.
-Each time I run the macro, it is deleting a row from remaining data
for no reason.


Hope you can fix that.


Thx alot once again.
Waiting for reply.- Hide quoted text -


- Show quoted text -


Thx Joel. It works as was required.
One last bit if you can add.
After this macro ends & we have the desired table, is there a
possibility to remove a row for which there is value in cell in
columnE but corresponding columnD cell is blank. If you can add this
step in same macro but at the end of what it has done so far. Putting
it in start will vary the result.

Thx alot once again.
Waiting for reply.- Hide quoted text -

- Show quoted text -


Hi Joel,
A minor last minute modification needed.

Waiting for reply.
Thx.

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default TABLE offset net zero amounts using a macro (Joel)

On Jun 20, 4:23*pm, Joel wrote:
Sub removerows()

FirstRow = 2
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
* *Grandtotal = Range("F" & RowCount)
* *If Grandtotal = 0 Then
* * * Rows(RowCount).Delete
* *Else
* * * NextID = Range("A" & (RowCount + 1))
* * * If NextID < "" Then
* * * * *If ID < NextID Then
* * * * * * 'sum the rows from FirstRow to present Row
* * * * * * Set SumRange = Range(Range("F" & FirstRow), _
* * * * * * * *Range("F" & RowCount))
* * * * * * Total = WorksheetFunction.Sum(SumRange)

* * * * * * If Total = 0 Then
* * * * * * * *Rows(FirstRow & ":" & RowCount).Delete
* * * * * * * *RowCount = FirstRow
* * * * * * Else
* * * * * * * *RowCount = RowCount + 1
* * * * * * * *FirstRow = RowCount
* * * * * * End If
* * * * * * ID = Range("A" & RowCount)
* * * * *End If
* * * Else
* * * * *RowCount = RowCount + 1
* * * End If
* *End If
Loop

RowCount = 2
Do While Range("F" & RowCount) < ""
* *If Range("D" & RowCount) = "" And _
* * * Range("E" & RowCount) < "" Then

* * * Rows(RowCount).Delete
* *Else
* * * RowCount = RowCount + 1
* *End If

Loop

End Sub



"Sinner" wrote:
On Jun 20, 2:47 am, Sinner wrote:
On Jun 20, 2:21 am, Joel wrote:


The microsoft Autofilter wasn't working correctly. *I got rid of it and did
the deletes in my code.


Sub removerows()


FirstRow = 2
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
* *Grandtotal = Range("F" & RowCount)
* *If Grandtotal = 0 Then
* * * Rows(RowCount).Delete
* *Else
* * * NextID = Range("A" & (RowCount + 1))
* * * If NextID < "" Then
* * * * *If ID < NextID Then
* * * * * * 'sum the rows from FirstRow to present Row
* * * * * * Set SumRange = Range(Range("F" & FirstRow), _
* * * * * * * *Range("F" & RowCount))
* * * * * * Total = WorksheetFunction.Sum(SumRange)


* * * * * * If Total = 0 Then
* * * * * * * *Rows(FirstRow & ":" & RowCount).Delete
* * * * * * * *RowCount = FirstRow
* * * * * * Else
* * * * * * * *RowCount = RowCount + 1
* * * * * * * *FirstRow = RowCount
* * * * * * End If
* * * * * * ID = Range("A" & RowCount)
* * * * *End If
* * * Else
* * * * *RowCount = RowCount + 1
* * * End If
* *End If
Loop
End Sub


"Sinner" wrote:
On Jun 19, 10:55 pm, Joel wrote:
The code was more complicated than I originally expected


Sub removerows()


Columns("F").AutoFilter _
* * field:=1, _
* * Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete


FirstRow = 1
RowCount = FirstRow
ID = Range("A" & RowCount)
Do While Range("F" & RowCount) < ""
* *NextID = Range("A" & (RowCount + 1))
* *If NextID < "" Then
* * * If ID < NextID Then
* * * * *'sum the rows from FirstRow to present Row
* * * * *Set SumRange = Range(Range("F" & FirstRow), _
* * * * * * Range("F" & RowCount))
* * * * *Total = WorksheetFunction.Sum(SumRange)


* * * * *If Total = 0 Then
* * * * * * Rows(FirstRow & ":" & RowCount).Delete
* * * * * * RowCount = FirstRow
* * * * *Else
* * * * * *RowCount = RowCount + 1
* * * * * *FirstRow = RowCount
* * * * *End If
* * * * *ID = Range("A" & RowCount)
* * * End If
* *Else
* * * RowCount = RowCount + 1
* *End If
Loop
End Sub


"Sinner" wrote:
On Jun 19, 8:11 pm, Joel wrote:
Columns("F").AutoFilter _
* * field:=1, _
* * Criteria1:=0
Rows.SpecialCells(xlCellTypeVisible).EntireRow.Del ete


"Sinner" wrote:
Hi,


I want to remove all zero balance in the file.
File:http://savefile.com/files/1618048


Thx.- Hide quoted text -


- Show quoted text -


Thx for the reply Joel.
Still the numbers with comulative zero in columnF are there like
(-2000) & (+2000) for same entities.
Do we have to fill the blank# cells in columnA first & then make a
temp column to offset the balances & remove balances that are zero?


Waiting for reply.
Thx.- Hide quoted text -


- Show quoted text -


Thx Joel for the concern.
The code however is dowing two unusual things.


-Deleting the header row.
-Each time I run the macro, it is deleting a row from remaining data
for no reason.


Hope you can fix that.


Thx alot once again.
Waiting for reply.- Hide quoted text -


- Show quoted text -


Thx Joel. It works as was required.
One last bit if you can add.
After this macro ends & we have the desired table, is there a
possibility to remove a row for which there is value in cell in
columnE but corresponding columnD cell is blank. If you can add this
step in same macro but at the end of what it has done so far. Putting
it in start will vary the result.


Thx alot once again.
Waiting for reply.- Hide quoted text -


- Show quoted text -


Hi Joel,
A minor last minute modification needed.


Waiting for reply.
Thx.- Hide quoted text -


- Show quoted text -


Thx alot Joel for the much needed support :) worked like a charm ; )
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot table - Filter - no filter by value Andrew in Jax Excel Discussion (Misc queries) 0 September 18th 09 02:38 PM
Need VBA Code/Marcos To Hide Less than zero amounts. Not a filter ABA Excel Worksheet Functions 1 May 14th 08 07:32 PM
11 $ amounts, 6 of the amounts must equal $3854.12, which 6? Marianne Excel Discussion (Misc queries) 2 August 26th 06 12:39 AM
Filter records in a table to extract to another table gams Excel Discussion (Misc queries) 0 May 9th 06 08:38 PM
single table with columns that have different amounts of rows jleipart New Users to Excel 5 February 28th 06 07:43 PM


All times are GMT +1. The time now is 05:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"