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

I'd like to create a macro that will hide rows between to points. The
spreadsheets I'm working with are always set up the same. The title of the
spreadsheet is in cell A1. Then column A is blank for a varying number of
rows (depending on the spreadsheet), until it reaches the column header row
with the actual data range. There is miscellaneous information in column B.
I want to be able to hide all the rows between the Title row (always row 1)
and the column header row (row location varies). The typical setup would
look like this:

Column A Column B Column C
Sales History Report
miscellaneous
miscellaneous
miscellaneous
miscellaneous

Item Sales Units
xxxxx $1,000 500


Can someone help me with this code?

Thanks,

Jeff
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default vba for hiding rows

Dim i As Long

i = 1
Do
i = i + 1
Loop Until Range("A" & i).Value < ""
Rows("2:" & i - 1).Hidden = True


--

HTH

RP
(remove nothere from the email address if mailing direct)


"goofy11" wrote in message
...
I'd like to create a macro that will hide rows between to points. The
spreadsheets I'm working with are always set up the same. The title of

the
spreadsheet is in cell A1. Then column A is blank for a varying number of
rows (depending on the spreadsheet), until it reaches the column header

row
with the actual data range. There is miscellaneous information in column

B.
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
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
Copying Rows when hiding other rows Neutron1871 Excel Worksheet Functions 2 November 3rd 04 11:38 PM


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