Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Hide Rows ? (Excel 2003)

    Hi

    I have a worksheet which contains input ws where an address is entered, and an Agreement ws which is linked to these cells when printed is emulates a word doc.

    The Input ws has 6 Cells to enter Name and Address, but sometime there are only five rows (or less) to the address. See sample attached.

    So Ideally I would like to hide row 11 in the agreement ws or any other where the link returns 0, but not where it returns text

    I have made a pathetic attempt to do this, which should give somebody a laugh if nothing else, because this is a legal document I do not want the user to edit it.

    Regards


    Braddy
    If you are a fool at forty, you will always be a fool

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hide Rows ? (Excel 2003)

    Change the line
    <code>
    If Range("A9:A14") <> "" Then
    </code>
    to
    <code>
    If Range("A" & i) = 0 Then
    </code>
    Notes:
    1) You loop from i = 9 to i = 14, so you should handle each row separately instead of handling A9:A14 in each step of the loop.
    2) <> "" would hide each row in which the cell in column A is not blank. You want to hide a row if column A contains a 0.

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Hide Rows ? (Excel 2003)

    Hi Hans

    Many thanks for your prompt reply, and the comprehensive explanation.

    I am most grateful.

    Braddy
    If you are a fool at forty, you will always be a fool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •