View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] youu917@gmail.com is offline
external usenet poster
 
Posts: 29
Default Hide Column without data

On 1月30日, 上午11时23分, wrote:
Can any pro tell me about how to make a button that when clicked on,
it will hide those columns without certain Data. As in : Any column
doesn't have data in Row 3, it will hide when clicked the button.


haha, how stupid i am! sorry, i solved my problem already, here is the
code:
Sub Column_hide()
Dim r As Variant
For r = 9 To 700
If Cells(r, 71).Value = "0" Then
Rows(r).Hidden = True
End If
Next
End Sub