LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Basic VBA question - hiding rows

I'm trying to learn a little bit of VBA, and I think what I'm trying to do
right now is pretty simple - it's just that it's a lot of things (for someone
with my lack of knowledge) to put together.

What I want to do is allow users to click on a cell and have excel hide a
large number of rows based on which cell was clicked. Here is a general
process description of how I think of it, in terms of excel:

1) In Column A, Row 3, I have entered the word "Length". In the columns that
follow, I have a number of different value representing lengths. In column A,
row 18, the word Length appears again, followed in subsequent columns by
several values.

2) When the user clicks on any cell in Column A containing the word
"Length," this macro should determine how many cells contain text in column A
(using end.xlup, I guess?), and define a range from row 3 to row whatever the
last row with a text in column A is.

3) Then, once this is defined, excel should hide all rows in the range of
Row3:RowX for which the word in Column A is not "Length" (ie hide all other
rows).

4) Finally, when the user clicks on the word "Length" again, the macro will
unhide all rows.

Does this seem reasonable and rational? I know one might do something sort
of similar by just using tables, but that would screw with other things I'm
trying to do. Does my description make sense, and are there smarter ways of
doing what I want to do in VBA?

Thanks for any and all help.
 
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
Basic Pivot Table question re adding rows to source data and refre KateW Excel Discussion (Misc queries) 6 July 25th 08 03:29 PM
Color alternate rows when after hiding selected rows Monk[_2_] Excel Worksheet Functions 6 June 7th 08 01:36 AM
Hiding Specific Rows Based on Values in Other Rows Chris Excel Worksheet Functions 1 November 2nd 06 08:21 PM
Hiding a button when hiding rows fergusor Excel Discussion (Misc queries) 2 August 10th 06 02:31 PM
Hiding Rows if the linked rows are blank KG Excel Discussion (Misc queries) 9 May 18th 05 02:32 AM


All times are GMT +1. The time now is 08:18 PM.

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

About Us

"It's about Microsoft Excel"