Private Sub Worksheet_Change(ByVal Target As Range)
Dim lCol As Long
If Intersect(Target, Range("B5")) Is Nothing Then Exit Sub
For lCol = Columns("F").Column To Columns("S").Column
With Cells(38, lCol)
.EntireColumn.Hidden = (.Value = 0)
End With
Next lCol
End Sub
HTH
--
AP
"xkarenxxxx" <xkarenxxxx@discussions.microsoft.com> a écrit dans le message
de news: E2EC27C1-E55F-41B0-8920-2A150822F8F2@microsoft.com...
> I'm not getting this to work. I want to hide any columns in the range of
> F
> to S if the value in row 38 of the column is zero. This can change from
> zero
> when the value in cell B5 is changed
>
> "Ardus Petus" wrote:
>
>> Columns(8) is column H
>> You could also type: Columns("H") for better readability (but poor
>> performance)
>>
>> HTH
>> --
>> AP
>>
>> "xkarenxxxx" <xkarenxxxx@discussions.microsoft.com> a écrit dans le
>> message
>> de news: 627CD2DA-0F17-47F5-B682-D5A53D43FAD2@microsoft.com...
>> > Can you tell me what the significance of the (8) is, so I can
>> > understand
>> > what
>> > the code is doing?
>>
>>
>>
Bookmarks