Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hide a row based on values

Is it possible to hide a row based on a value within the row?

If cell A1= true display row A

else hide row A from view

I will be running this in all versions of Excel from 97 to 2003 ar
there any limitations on which will work and which will not?

Any assistance is appreciated

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Hide a row based on values

Steve,

Are you looking for a macro to loop through a range hiding as it goes, or
one that hides the row as A1 doesn't equal TRUE? If the latter, how would
you reset?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"stevenmckeon " wrote in
message ...
Is it possible to hide a row based on a value within the row?

If cell A1= true display row A

else hide row A from view

I will be running this in all versions of Excel from 97 to 2003 are
there any limitations on which will work and which will not?

Any assistance is appreciated.


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Hide a row based on values

Hi try this

Private Sub CommandButton1_Click()

If Range("A12").Value = "True" Then
Rows("9:9").Select
Selection.EntireRow.Hidden = True
Else
Rows("9:9").Select
Selection.EntireRow.Hidden = False
End If
End Sub

good luck

ross
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hide a row based on values

Thanks Ross - this will do nicely!

Appreciate the assistance.

ross wrote:
*Hi try this

Private Sub CommandButton1_Click()

If Range("A12").Value = "True" Then
Rows("9:9").Select
Selection.EntireRow.Hidden = True
Else
Rows("9:9").Select
Selection.EntireRow.Hidden = False
End If
End Sub

good luck

ross


--
Message posted from http://www.ExcelForum.com

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
Hide cell values based on a condition in another cell Cat Excel Worksheet Functions 1 January 4th 07 07:21 AM
Can visual basics hide rows based on cell values? Jerrypetch Excel Discussion (Misc queries) 4 September 11th 06 07:21 PM
Hide Rows based on value SteveT Excel Discussion (Misc queries) 0 June 27th 06 11:00 PM
Hide a row based on a cel value guillaume Excel Discussion (Misc queries) 5 May 18th 06 01:13 PM
Predict Y-values on new X-values based on other actual X and Y values? NorTor Excel Programming 2 August 10th 03 03:08 PM


All times are GMT +1. The time now is 11:19 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"