View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chris Chris is offline
external usenet poster
 
Posts: 1
Default Hiding Specific Rows Based on Values in Other Rows

I have a worksheet used for inventory. In Column A is the quantity (to
be entered manually). In Column B is the product description. In
Column C is the price of the product, and Column D the total price
(column C price x the quantity entered in Column A). At the bottom of
the worksheet is a grand total. Also, Column B (products) is grouped
into subheadings by the supplier each product came from (for example,
row 6 has the title PPG, and then rows 7-137 list every product from
PPG).

The calculations in this worksheet work fine. What I am trying to do
is, using a macro once all of the appropriate quantities are entered in
column A, automatically hide every row of product that does not have a
quantity. The tricky part is, if no products under a given supplier
subheader are entered, the subheader also hides, and if a quantity is
entered, that subheader shows. For example, if I have no quantities
under any products for PPG, then the PPG subheader hides, but if just
one quantity is added, PPG shows. Also, this list will be constantly
updated, new products will be put in and taken out all of the time, so
I cannot base the macro on a specific number of rows.

I am new to VB but being forced to learn very quickly due to this
project. Any suggestions?