Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting rows (with zeros) with a macro | Excel Worksheet Functions | |||
Deleting rows (with zeros) with a macro | Excel Worksheet Functions | |||
How do I create a macro to add zeros in front of a value? | Excel Worksheet Functions | |||
Macro Help replacing dropped zeros | Excel Discussion (Misc queries) | |||
Help with leading Zeros when running Macro | Excel Worksheet Functions |