Can you please help me further expand the macro below? I need it to also look between the ranges of C24 and Z24 and hide the respective column. (i.e need some sort of loop)
i.e
if C24 is 0, then hide column C
if D24 is 0, then hide column D
etc...
Sub Hide_Column ()
If Range("H24").Value = 0 Then
Columns("H").EntireColumn.Hidden = True
Else
Columns("H").EntireColumn.Hidden = False
End If
bomb, old man, I know you are the far better coder, so what are the advantages of your code over mine (which I grabbed from somewhere else, but I don't know who wrote it or I would give credit for the work)??
Does it get around the problem with null cells?
Duh - I should have read the IF() more carefully. And no loop - much better!! :up: :up:
Status
Not open for further replies.
You have insufficient privileges to reply here.
Related Threads
?
?
?
?
?
Tech Support Guy
9.9M posts
859.7K members
Since 1998
A forum community dedicated to tech experts and enthusiasts. Come join the discussion about articles, computer security, Mac, Microsoft, Linux, hardware, networking, gaming, reviews, accessories, and more!