View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Applewine Applewine is offline
external usenet poster
 
Posts: 1
Default How to auto hide an empty row with VBA?

Is it possible to have Excel hide a row automatically if there is no
entry there?

My worksheet Subtotals data on 5 rows, then creates a Total on the 6th
row.
If there is no data on any row, can I hide them so the Total line
appears right below the last entry?

For example:

Subtotal 1 (SUMIF function used)
Subtotal 2 (SUMIF function used)
Subtotal 3 (SUMIF function used)
Empty Subtotal 4 (SUMIF function used)
Empty Subtotal 5 (SUMIF function used)
TOTAL (SUM of all above)

My first guess is to use Change event, looking at a cell that would
count the number of subtotals that are not empty, then use VBA to hide
the empty ones...?


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