Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to repeat the following code for rows 1 to 135. If the value of the
cell in Column G is false, I need to hide the whole row. Rather than type in masses of code, can anyone suggect some sort of loop to repeat 135 times. If Worksheets("Quote").Range("G1") = False Then Worksheets("Quote").Rows("1").Hidden = True End If Many thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like this...
Sub HideRows() Dim intCounter As Integer With Sheets("Sheet2") For intCounter = 1 To 135 If .Cells(intCounter, "G").Value = False Then _ .Rows(intCounter).Hidden = True Next intCounter End With End Sub -- HTH... Jim Thomlinson "Steve" wrote: I need to repeat the following code for rows 1 to 135. If the value of the cell in Column G is false, I need to hide the whole row. Rather than type in masses of code, can anyone suggect some sort of loop to repeat 135 times. If Worksheets("Quote").Range("G1") = False Then Worksheets("Quote").Rows("1").Hidden = True End If Many thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That works great. Many thanks
"Jim Thomlinson" wrote: Try something like this... Sub HideRows() Dim intCounter As Integer With Sheets("Sheet2") For intCounter = 1 To 135 If .Cells(intCounter, "G").Value = False Then _ .Rows(intCounter).Hidden = True Next intCounter End With End Sub -- HTH... Jim Thomlinson "Steve" wrote: I need to repeat the following code for rows 1 to 135. If the value of the cell in Column G is false, I need to hide the whole row. Rather than type in masses of code, can anyone suggect some sort of loop to repeat 135 times. If Worksheets("Quote").Range("G1") = False Then Worksheets("Quote").Rows("1").Hidden = True End If Many thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Looking up the value corresponding to the last repetition in a ran | Excel Worksheet Functions | |||
Random number with no repetition? | Excel Discussion (Misc queries) | |||
repetition cases | Excel Discussion (Misc queries) | |||
PivotTable - Repetition of rows | Excel Discussion (Misc queries) | |||
check for repetition of cell contents | Excel Worksheet Functions |