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

Sorry... misunderstood what you were trying to do. Attempt #2:

sub HideEmptyRows

Dim Col as integer
Dim Row as integer
Dim CountingValue as integer

range(cells(1,1),cells(100,1)).entirerow.hidden = false
For row = 1 to 100
col = 2
for col = 2 to 100 '(since column A contains the account number, it i
not included)
Countingvalue = countingvalue +trim$(cells(row,col).value)
next col
if countingvalue = 0 then
cells(row,1).entirerow.hidden = true
else countingvalue = 0
end if
Next row

end sub


When using this script, make sure that all cells within the range (th
row / col statements) contain a value (more specifically, a integer)
otherwise the trim$(cells(row,col).value) statement will generate a
error

--
Message posted from http://www.ExcelForum.com

 
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 02:26 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"