Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Unhiding rows

Hi,

I am very, very new to macros so please forgive me. I am trying to unhide
rows when the word "Yes" is selected in a cell. I have found (and modified
the following macro) from another post, which works great:

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("c14").Text = "Yes" Then Rows("15:16").EntireRow.Hidden = False
If Range("c14").Text = "" Then Rows("15:16").EntireRow.Hidden = True
End Sub

My problem is, I need this to work for the following as well:

if c17 is yes, unhide 18:19
if c20 is yes, unhide 21:22
if c23 is yes, unhide 24:25

I tried copying and pasting the first macro and modifying it for each
scenario but I get an error message (something about the Private Sub).

Any help would be greatly appreciated! :)
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
hiding/unhiding rows Art Excel Worksheet Functions 1 March 16th 10 06:00 PM
Unhiding Rows Struggling of Essex Excel Discussion (Misc queries) 7 March 7th 10 01:53 PM
Unhiding rows John Excel Discussion (Misc queries) 1 February 11th 09 09:06 PM
hidden rows keep unhiding themselves! Markathepub Excel Discussion (Misc queries) 2 November 29th 05 05:39 PM
Unhiding Rows Vasant Nanavati[_2_] Excel Programming 0 August 19th 03 12:54 AM


All times are GMT +1. The time now is 07:00 AM.

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"