Forum Discussion
Excel / Auto Hide Rows
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?
- mathetesSilver Contributor
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.
- Taylor_WatsonCopper Contributor
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,554 Tons ~Piers 3,553.5 Tons E1 3,553.53 Tons E2 - Tons - mathetesSilver Contributor
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.