Forum Discussion

ianwuk's avatar
ianwuk
Iron Contributor
Nov 21, 2018
Solved

How to hide rows if a cell value is above a specified value from a different cell?

Hello.

I have a spreadsheet and part of it looks like this (you can see that cell C4 has 60):

Based on the above cell, C4, which is 60, it will count from 0 up tp what is in C4, like this, in the A column:


How can I make it so that all rows from 61 (A74) are completely hidden, because the number is above what has been entered in cell C4?

So, because in the example here, C4 is 60, I want it to then look like this:

As you can see, the data stops at 60, because cell A74 is higher than the value in C4 (I just deleted it all to make this screenshot, I want to do it either through a formula or conditional formatting so it is done automatically).

How can I achieve this?

Many thanks, and I hope this makes sense.

  • Like this, but in formula it shall be relative reference for the row, not absolute. Other words $A14, not $A$14. And it shall be first (most top left) cell of your range

    Please see attached, "not visible" region is in grey.

     

     

7 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    If by conditional formatting you may use the rule with formula

    =$A1>=$C$4

    applied to your entire range and using Fill=White/Font Color=White format

     

    • ianwuk's avatar
      ianwuk
      Iron Contributor

      Hi SergeiBaklan.  Thanks for replying.

      Silly question, but what cell would I put it in?  Can it not be done as a formula with an IF, such as:

      IF cell value > C4, hide all rows that occur afterwards

      I tried this, but nothing changes.

       

      You can see that I have put your formula, with white formatting, to be applied to my entire dataset.

      What am I doing wrong?  Many thanks.


      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        Like this, but in formula it shall be relative reference for the row, not absolute. Other words $A14, not $A$14. And it shall be first (most top left) cell of your range

        Please see attached, "not visible" region is in grey.

         

         

Resources