Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Hiding Specific Rows Based on Values in Other Rows

Have you considered using an AutoFilter?

Select your data range...then...
From the Excel main menu:
<data<filter<autofilter
That will put drop down arrows in each column title
Click on the drop down for Qty and select: non-blanks

That will hide all of the rows with blank qty fields.

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Chris" wrote:

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?


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
hide rows based on cell value dummster New Users to Excel 1 February 15th 06 11:37 PM
Hide/Delete entire rows based in the content of one cell Clueless Excel Discussion (Misc queries) 2 October 3rd 05 02:40 PM
Hiding Rows if the linked rows are blank KG Excel Discussion (Misc queries) 9 May 18th 05 02:32 AM
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns foofoo Excel Discussion (Misc queries) 1 April 2nd 05 12:02 AM
Count rows based on multiple criteria Murph Excel Worksheet Functions 1 October 28th 04 07:13 AM


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