A few things.
Currently the cells you are checking have #REF errors. I have added error check to hide these. You might want to actually fix the formula.
You had no Next line.
No reference to the Axes object for setting values.
Sub Update()
Application.ScreenUpdating = False
For Each cell In Range("AA1:DU1").Cells
If Not IsError(cell) Then
If LCase(cell) = "hide" Then
cell.EntireColumn.Hidden = True
Else: cell.EntireColumn.Hidden = False
End If
Else
cell.EntireColumn.Hidden = True
End If
Next
With ActiveSheet.ChartObjects(1).Chart
' Value (Y) Axis With .Axes(xlValue)
With .Axes(xlValue)
.MinimumScale = ActiveSheet.Range("$X$4").Value
.MajorUnit = ActiveSheet.Range("$X$5").Value
End With
End With
End Sub
Bookmarks