View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Hiding Cells Automatically

Hi
your questions:
1. This works the entire workbook starting in row 1 two the last used
row. If you want it to start at a different row change the line
For r = .UsedRange.Rows(.UsedRange.Rows.Count).Row To 1 Step -1
to
For r = .UsedRange.Rows(.UsedRange.Rows.Count).Row To start_row_number
Step -1

2. Yes this macro will use sheet 1. If you want to run the macro on the
active sheet change the line
With Worksheets("Sheet1")
to
With ActiveSheet

3. To remove the error combine the two line
If Application.CountA(Range(Cells(r,"C"),Cells(r,"O") )) = 0
Then

into ONE signle line (wordwarpping from the newsreader causes this)

--
Regards
Frank Kabel
Frankfurt, Germany

Hartsell wrote:
OK,
Please don't think this is a stupid question, but are there certain
areas in the formula that are meant as references?

Like somewhere should i say "Start at row 5 and work down"? "Sheet
1" - is this the name of the sheet where the macro does its work ie
"Totals"? The IF Application line is giving me back an error
"Expected Then or GoTo". When i enter "Then" i get another Expected:
line # or end of statment. So when you use things like "Range" and
Cells" is that literal content or am i expected to enter some
argument?

This is probably why i always have problems, i just don't have the
knowledge to know why what is where, and therefore get stuck.

Bryan