If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
macro - hide rows
I will try this again but I do not understand all the
lingo so please lead me. Cells A2:A60 contain formulas that return a result of either "" or a number. Question is - Could the result of "" from that formula (say in A4) be enough to trigger HIDING row 4 ?? I will unhide them as I need unless it is possible at the same time to unhide row 4 should the result of A4 ever become a number. If possible please do tell. I went the wrong route before by right clicking the sheet tab and going to view code. Thanks greatly for any help........Will |
#2
|
|||
|
|||
macro - hide rows
One way that I found that worked for this is the following:
In the Sheet Code area, Private Sub Worksheet_Calculate() Dim ToHide as Integer For ToHide = 2 to 60 If Cells(ToHide, 1).Value = "" Then Rows(ToHide).Hidden = True Else Rows(ToHide).Hidden = False End If Next ToHide End Sub There may be other ways, but it worked for me. Hope it does the same for you. On Tue, 16 Sep 2003 21:21:39 -0700, "Will" wrote: I will try this again but I do not understand all the lingo so please lead me. Cells A2:A60 contain formulas that return a result of either "" or a number. Question is - Could the result of "" from that formula (say in A4) be enough to trigger HIDING row 4 ?? I will unhide them as I need unless it is possible at the same time to unhide row 4 should the result of A4 ever become a number. If possible please do tell. I went the wrong route before by right clicking the sheet tab and going to view code. Thanks greatly for any help........Will |
#3
|
|||
|
|||
macro - hide rows
Will
Try the code below Rajesh Sub HideRows() Dim RowNo As Integer RowNo = 2 Cells.Select Selection.EntireRow.Hidden = False Cells(2, 1).Select For i = 1 To 59 Cellvalue = Sheets(1).Cells(RowNo, 1).Value If Cellvalue = "" Then Add = ActiveCell.Address Rows(RowNo).Select Selection.EntireRow.Hidden = True End If RowNo = RowNo + 1 Next i End Sub -----Original Message----- I will try this again but I do not understand all the lingo so please lead me. Cells A2:A60 contain formulas that return a result of either "" or a number. Question is - Could the result of "" from that formula (say in A4) be enough to trigger HIDING row 4 ?? I will unhide them as I need unless it is possible at the same time to unhide row 4 should the result of A4 ever become a number. If possible please do tell. I went the wrong route before by right clicking the sheet tab and going to view code. Thanks greatly for any help........Will . |
#4
|
|||
|
|||
macro - hide rows
Eric !! that's it. Worked great. Much Thanks.....Will
-----Original Message----- One way that I found that worked for this is the following: In the Sheet Code area, Private Sub Worksheet_Calculate() Dim ToHide as Integer For ToHide = 2 to 60 If Cells(ToHide, 1).Value = "" Then Rows(ToHide).Hidden = True Else Rows(ToHide).Hidden = False End If Next ToHide End Sub There may be other ways, but it worked for me. Hope it does the same for you. On Tue, 16 Sep 2003 21:21:39 -0700, "Will" wrote: I will try this again but I do not understand all the lingo so please lead me. Cells A2:A60 contain formulas that return a result of either "" or a number. Question is - Could the result of "" from that formula (say in A4) be enough to trigger HIDING row 4 ?? I will unhide them as I need unless it is possible at the same time to unhide row 4 should the result of A4 ever become a number. If possible please do tell. I went the wrong route before by right clicking the sheet tab and going to view code. Thanks greatly for any help........Will . |
Thread Tools | |
Display Modes | |
|
|