View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
jc jc is offline
external usenet poster
 
Posts: 18
Default Cell Reference- Hiding Rows-Urgent

Why not just format the cells so zero values are blank?

in the format window the format upto the first semi-colon
are positive, up to the 2nd are negative and after that
will format for zero values
example $#,##0.00_);[Red]($#,##0.00);$#,##0.00_ or to make
the 0 blank, don't put anything after the 2nd
$$#,##0.00_);[Red]($#,##0.00); (be sure to include the
semi-colon at the ent)
-----Original Message-----
Try putting somthing like this in your "(Sheet2)" module
under MS Excel Objects:

Private Sub Worksheet_Calculate()

lastrow = Range("A1").CurrentRegion.Rows.Count

For a = 1 To lastrow
If Range("A" & a).Value = 0 Then
Range("A" & a).EntireRow.Hidden = True
Else
Range("A" & a).EntireRow.Hidden = False
End If
Next a

End Sub




-----Original Message-----
I have 2 sheets where the 2nd sheet has 5 columns. All 5

columns make
cell reference to first sheet(which has formulas).

Now i need to hide the rows in the 2nd sheet since it

shows 0, until
some calculation is made & the result is put up. The

rows
should pop up
only when it has the result value.Until then it should

be
hidden.

[The 0's are shown becoz it has cell reference to 1st

sheet, which
contains formulas]


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

.

.