Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cell Reference- Hiding Rows-Urgent

I have 2 sheets where the 2nd sheet has 5 columns. All 5 columns mak
cell reference to first sheet(which has formulas).

Now i need to hide the rows in the 2nd sheet since it shows 0, unti
some calculation is made & the result is put up. The rows should pop u
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, whic
contains formulas

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Cell Reference- Hiding Rows-Urgent

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/

.

  #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/

.

.

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
Hiding rows based on a cell? OX_Gambit Excel Worksheet Functions 3 July 10th 09 03:05 AM
Hiding rows based value of cell within row Legion_c18 Excel Discussion (Misc queries) 0 February 22nd 08 06:01 AM
Hiding rows if specific cell does not contain key word jermsalerms Excel Worksheet Functions 1 June 22nd 06 06:10 PM
Hiding Rows if Blank cell mohd21uk via OfficeKB.com Excel Worksheet Functions 3 April 13th 06 10:28 AM
Hiding Rows when a cell = 0 mday Excel Discussion (Misc queries) 1 March 21st 06 12:29 AM


All times are GMT +1. The time now is 08:14 AM.

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

About Us

"It's about Microsoft Excel"