View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Brian Brian is offline
external usenet poster
 
Posts: 683
Default Macro to perform action based on value in cell

Sub Macro1()
If Cells(1, 1) = "N/A" Then '1,1 is the row & column for cell A1
Rows("48:56").Select
Selection.EntireRow.Hidden = True
Else
Rows("48:56").Select
Selection.EntireRow.Hidden = False
End If
End Sub


"jackie" wrote:

Hi-

I am trying to create a macro to hide rows based on the text value in cell
A1.
If A1 = N/A, hide rows 48 through 56. Sheet is called Monthly Statement.
A1 has an iserror formula that returns N/A if an error and a number if not.

Thanks.