I was given this code that works great. Now I would like to get a little more specific with WHAT opens up.
Each column range AJ:AO, AR:AX and BA:BG has the potential to have values, so if the officer is in row 36 and there is data in AJ36, but also in AR6, both AJ:AO and AR:AX will unhide. I would only like the cloumn set to unhide if there is value in the ROW 36 or the row they are in.
Can anyone help?
[vba]
Sub reassess_open()
'
' reassess_open Macro
' Macro recorded 16/12/2005
'
With ActiveSheet
If WorksheetFunction.CountA(.Range("AJ5:AJ105")) <> 0 Then
.Range("AJ:AO").Columns.Hidden = False
If WorksheetFunction.CountA(.Range("AR5:AR105")) <> 0 Then
.Range("AR:AX").Columns.Hidden = False
If WorksheetFunction.CountA(.Range("BA5:BA105")) <> 0 Then
.Range("BA:BG").Columns.Hidden = False
End If
End If
End If
End With
End Sub[/vba]