Excel / Auto Hide Rows

%3CLINGO-SUB%20id%3D%22lingo-sub-2750361%22%20slang%3D%22en-US%22%3EExcel%20%2F%20Auto%20Hide%20Rows%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2750361%22%20slang%3D%22en-US%22%3E%3CP%3EDoes%20anybody%20now%20how%20to%20create%20a%20formula%20that%20Automatically%20hides%20an%20entire%20row%20if%20one%20of%20the%20cells%20in%20that%20row%20has%20a%20certain%20value%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2750361%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2750504%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20%2F%20Auto%20Hide%20Rows%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2750504%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F475120%22%20target%3D%22_blank%22%3E%40Taylor_Watson%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDepends%20in%20part%20on%20what%20you%20mean%20by%20%22Hides%22%20and%20on%20the%20bigger%20picture%20into%20which%20this%20request%20fits.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAssuming%20that%20it's%20the%20value%20in%20the%20cell%20in%20column%20A%2C%20which%2C%20if%20it's%203%2C%20is%20cause%20for%20none%20of%20the%20other%20cells%20to%20be%20displayed%2C%20you%20could%20always%20add%20an%20IF%20condition%20to%20each%20of%20the%20other%20cells%20in%20the%20row%3A%3C%2FP%3E%3CP%3Ee.g.%2C%20in%20cell%20B2%2C%20which%20now%20has%20%3D%5Bsome%20formula%5D%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DIF(A2%3D3%2C%22%22%2C%5Bsome%20formula%5D)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EThat%20formula%20would%20replace%20the%20value%20of%20%5Bsome%20formula%5D%20with%20a%20blank%20cell%20if%20column%20A%20contains%203%3C%2FP%3E%3CP%3Eand%20so%20on%20across%20the%20row%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20more%20healthy%20way%20to%20handle%20this%20would%20be%20to%20leave%20all%20the%20rows%20on%20your%20core%20table%20as%20they%20are%2C%20but%20have%20a%20separate%20worksheet%20that%20uses%20FILTER%20to%20display%20rows%20that%20don't%20have%203%20in%20column%20A.%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DFILTER(OrigTable%2COrigTable!A2%3AA34%26lt%3B%26gt%3B3)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fexceljet.net%2Fexcel-functions%2Fexcel-filter-function%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fexceljet.net%2Fexcel-functions%2Fexcel-filter-function%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20those%20are%20just%20for%20starters.%20Please%20come%20back%20with%20further%20info%20on%20the%20bigger%20picture%20that%20lies%20behind%20your%20question%20if%20those%20two%20suggestions%20miss%20the%20mark.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2761538%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20%2F%20Auto%20Hide%20Rows%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2761538%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFOR%20EX.%3C%2FP%3E%3CP%3EBelow%20represents%204%20rows%20and%202%20columns%20of%20data%20that%20are%20populated%20from%20a%20different%20tab%20inside%20my%20spreadsheet.%3C%2FP%3E%3CP%3EI%20want%20to%20create%20a%20formula%20that%20automatically%20hides%20the%20entire%20row%20labeled%20E2%20b%2Fc%20there%20is%20not%20a%20number%20in%20the%20second%20column.%3C%2FP%3E%3CP%3EIs%20there%20an%20easy%20formula%20for%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%221241%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22688px%22%3ETAKEOFF%201%3C%2FTD%3E%3CTD%20width%3D%22358px%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%203%2C554%3C%2FTD%3E%3CTD%20width%3D%22194px%22%3ETons%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22688px%22%3E~Piers%3C%2FTD%3E%3CTD%20width%3D%22358px%22%3E%26nbsp%3B3%2C553.5%3C%2FTD%3E%3CTD%20width%3D%22194px%22%3ETons%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22688px%22%3EE1%3C%2FTD%3E%3CTD%20width%3D%22358px%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%203%2C553.53%3C%2FTD%3E%3CTD%20width%3D%22194px%22%3ETons%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22688px%22%3EE2%3C%2FTD%3E%3CTD%20width%3D%22358px%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-%26nbsp%3B%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22194px%22%3ETons%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Does anybody now how to create a formula that Automatically hides an entire row if one of the cells in that row has a certain value?

4 Replies

@Taylor_Watson 

 

Depends in part on what you mean by "Hides" and on the bigger picture into which this request fits.

 

Assuming that it's the value in the cell in column A, which, if it's 3, is cause for none of the other cells to be displayed, you could always add an IF condition to each of the other cells in the row:

e.g., in cell B2, which now has =[some formula]

=IF(A2=3,"",[some formula])

That formula would replace the value of [some formula] with a blank cell if column A contains 3

and so on across the row

 

A more healthy way to handle this would be to leave all the rows on your core table as they are, but have a separate worksheet that uses FILTER to display rows that don't have 3 in column A.

=FILTER(OrigTable,OrigTable!A2:A34<>3)

 

https://exceljet.net/excel-functions/excel-filter-function

 

But those are just for starters. Please come back with further info on the bigger picture that lies behind your question if those two suggestions miss the mark.

 

 

FOR EX.

Below represents 4 rows and 2 columns of data that are populated from a different tab inside my spreadsheet.

I want to create a formula that automatically hides the entire row labeled E2 b/c there is not a number in the second column.

Is there an easy formula for this?

 

TAKEOFF 1                                                                          3,554Tons
~Piers 3,553.5Tons
E1                                                                    3,553.53Tons
E2                                                                                -  Tons

@Taylor_Watson 

 

There is nothing in what you just posted that suggests you even read the prior response. Did you? Did you try either of the ideas presented there? So far as I know there is no formula, per se, that would hide the row although--as suggested in my prior response--it depends on what you mean by "hide."

 

The FILTER function would do it, on a separate page. And there was even a link to a page with instructions on how to use it.

 

Otherwise you're looking at a macro or a VBA routine, and that's not my field of expertise.

@Taylor_Watson  To expand on  @mathetes  response.  you say, "are populated from a different tab".  How is that being done? cell-based formula? pivot table?  Because if it is the former then mathetes suggestion is perfect because you can just add a conditional to that formula to ignore that data if the corresponding data in column X is blank.  You should be able to achieve similar results using a pivot table but use the filter option instead of an in-cell formula.  Maybe if you supplied a sample sheet we could aid better.

But as mathetes said, there is no in-cell formula to hide a row.  In-cell formula ONLY determine what to display in the cell in which it is located and has no ability to act on anything else.

That all said, there are 2 other options: VBA (also called macros), or Conditional Formatting

Using VBA you can create code to hide that row, but would need to define the 'trigger' action (i.e. when should the code run and perform a check. )

Using conditional formatting you can check if that cell is blank and format that whole row to have the same text and background color.  This will 'hide' the information in that row but not truly hide the row as the row will still be present, but it will look blank.