LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default excel97: filtering out the zeros macro

hello,

i wrote a simple code to filter out the zeros in three different
columns. for instance:

loanaccount balance balance2 cashbal
aaaaa $4567.89 $0.00 $0.00
ggghh $0.00 $3456.71 $0.00
eeeeei $0.00 $0.00 $0.00
rrrrrr $0.00 $0.00 $8760.99
kmlno $0.00 $0.00 $0.00

so basically loan accounts aaaaa, ggghh, and rrrrrr should be my end
result but neither three loans appear after i run my macro. did i
write the for counter wrong? what did i leave out?

thanks in advance.

here is the code--

Sub FilterZerosOut()
ActiveWindow.Zoom = 85
Range("A1").Select
ActiveCell.FormulaR1C1 = "INTERNAL #"
Range("B1").Select
ActiveCell.FormulaR1C1 = "OBLIGOR #"
Range("C1").Select
ActiveCell.FormulaR1C1 = "LOAN ACCOUNT"
Range("D1").Select
ActiveCell.FormulaR1C1 = "BALANCE"
Range("E1").Select
ActiveCell.FormulaR1C1 = "BALANCE2"
Range("F1").Select
ActiveCell.FormulaR1C1 = "CASHBALANCE"
Range("G1").Select
ActiveCell.FormulaR1C1 = "NEXT INT DATE"
Rows("1:1").Select
Selection.Font.Bold = True
Selection.Interior.ColorIndex = 15

'Sort by = 0.00
Range("D2").Select
If ActiveSheet.AutoFilterMode Then

Else
Cells.AutoFilter
End If


For Counter = 4 To 6
Cells.AutoFilter field:=Counter, Criteria1:="=0" 'not equal to
zero
Next Counter

End Sub
 
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
Deleting rows (with zeros) with a macro ToddS Excel Worksheet Functions 4 April 7th 09 09:53 PM
Deleting rows (with zeros) with a macro Scott R Excel Worksheet Functions 7 April 3rd 09 06:13 PM
How do I create a macro to add zeros in front of a value? rexie3 Excel Worksheet Functions 8 September 20th 06 01:54 AM
Macro Help replacing dropped zeros [email protected] Excel Discussion (Misc queries) 5 September 2nd 06 06:08 PM
Help with leading Zeros when running Macro bob Excel Worksheet Functions 2 March 5th 06 05:08 AM


All times are GMT +1. The time now is 07:27 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"