+ Reply to Thread
Results 1 to 4 of 4

Logic Statement to Hide Rows?

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    waterloo, canada
    MS-Off Ver
    Excel 2016
    Posts
    19

    Logic Statement to Hide Rows?

    Hi,
    I need to create logic, that will hide a changing number of contiguous rows that have a negative balance. My defined print area needs to remain the same, which includes a table of values, followed by a text box. In the example I included, as the user changes the Factor in B1, the Balance will change. Starting at the row where the Balance goes negative, I need to hide all the rows that follow with a negative balance. I need this to be done automatically through a logic statement ("IF" statement??).

    Thanking anyone that can help with this perplexing problem.
    Gordco
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    08-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Logic Statement to Hide Rows?

    Hi gordco,

    One way you could achieve what you are after is to use conditional formatting. Assuming the balance is always sorted highest to lowest I don't forsee any issues.

    See attached workbook for an example.

    fullysic
    Attached Files Attached Files
    Please click * if the suggestion helps you!

  3. #3
    Registered User
    Join Date
    12-12-2012
    Location
    waterloo, canada
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Logic Statement to Hide Rows?

    Quote Originally Posted by fullysic View Post
    Hi gordco,

    One way you could achieve what you are after is to use conditional formatting. Assuming the balance is always sorted highest to lowest I don't forsee any issues.

    See attached workbook for an example.

    fullysic
    Thanks for the suggestion. The only problem remaining is defining the print area. If the code covers 3 pages, but value drop below zero on page 1, the conditional formatting only shows values on page 1 (that's good). But the print command prints pages 2 and 3 also, which are blank. I could manually define the print area each time, but I hope to find a way to do this automatically. In other words, only print that which is visible.
    Thanks

  4. #4
    Forum Contributor
    Join Date
    01-09-2009
    Location
    Cedar Hill, Tx
    MS-Off Ver
    Excel 2003
    Posts
    200

    Re: Logic Statement to Hide Rows?

    Can you not use autoFilters to limit the data to be printed to only non-zero data? That should solve your blank page problem.

    HTH.

    Bob

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1