Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Macro to perform action based on value in cell

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perform action if value in cell - conditional VB stmt Studebaker Excel Discussion (Misc queries) 2 February 29th 08 06:34 PM
Need to perform action on range Mike G.[_3_] Excel Programming 3 March 3rd 07 10:29 PM
How to 'Click and then perform action' chris100[_7_] Excel Programming 14 August 2nd 05 02:57 PM
How to perform action in all worksheets Sethaholic Excel Programming 6 July 11th 05 07:44 PM
Perform action when cell is clicked Jason[_26_] Excel Programming 3 October 4th 03 06:08 PM


All times are GMT +1. The time now is 05:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"