Unhide line if value is greater than zero

  • Thread starter Thread starter Van Merrill
  • Start date Start date
V

Van Merrill

I want to have a data input sheet and a sales order
sheet. Both Sheets would be in the same workbook. The
data input sheet would list in the first column the
quanity of a specific product and the second column would
list the apprpriate model numberand the third column
would be the description of the product. I would like to
link these cells to the matching cells in the sales order
sheet. All the poduct lines would be hiddden in the sales
order sheet until a quanity greater than zero would be
entered in the matching data input sheet. In other words,
the sales order would be blank until someone enters a
number greater than zero in the datainput sheet for a
particular product which would cause the apprpriate line
to unhide in the sales order and we can then print the
sales order. Thank you so much in advance for your
help!!!!!!
 
Van Merrill,

I am going to first assume you know how to link your two
worksheets. If you don't know how to do that, post
another reply back and I can help you with that as well.
As for unhiding items on the sales order form, try this
macro in your worksheet. This macro will run each and
every time you select your sales order worksheet. It
assumes your item list begins at cell A2 and ends with an
empty cell. Let me know if this works for you or you
still need assistance.

Jerry


Private Sub Worksheet_Activate()
Range("A2").Select

Do While ActiveCell.Value <> ""
If ActiveCell.Value >= 1 Then
Selection.EntireRow.Hidden = False 'unhide
Else
Selection.EntireRow.Hidden = True 'hide
End If

ActiveCell.Offset(1, 0).Range("A1").Select
Loop

End Sub
 
Back
Top