ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Hide/Unhide Cells (https://www.excelbanter.com/excel-worksheet-functions/270259-hide-unhide-cells.html)

eddysmith

Hide/Unhide Cells
 
I am trying to use a formula in excel to unhide a row if a cell elsewhere in the worksheet has a value of "No." So far I have found only macros to do this, but I am not extremely versed in Macros, can anyone assist?

I will need to use this on multiple lines throughout the workbook.

And if the only way to do this is with a macro, can someone please explain it in the most layman's terms possible?

Thank you,
Eddy

tarquinious

Quote:

Originally Posted by eddysmith (Post 964623)
I am trying to use a formula in excel to unhide a row if a cell elsewhere in the worksheet has a value of "No." So far I have found only macros to do this, but I am not extremely versed in Macros, can anyone assist?

I will need to use this on multiple lines throughout the workbook.

And if the only way to do this is with a macro, can someone please explain it in the most layman's terms possible?

Thank you,
Eddy

Yes, this will require a macro to hide a column or row, however if you just wanted the values to become "invisible" perhaps you could try using Conditional Formatting to turn the text white (on a white background) based on the "No" value?

To do this:
- Highlight the cells you want to "hide" and select Conditional Formatting (on the Home button bar in Excel 7, under the Format menu in older versions from memory).
- Add a conditional Formatting rule
- Use the "Use formula to determine which cells to format" option
- type in the formula: =IF($B$3="No",TRUE,FALSE)
- Format the Font colour to White

NB: The "TRUE" and "FALSE" values work equally as well as 1 and 0, however written this way it is easier to understand what it is doing.
NB2: I used Cell B3 as an example of where your "No" value will appear, and the $ mean that it is in a fixed location. Remove the $ if you want to use a range of cells containing the "No" value.

Now when the value of B3 changes to No, the cells you applied Conditional Formatting to will become white.

If you really need to hide the column, let me know and I can try to explain the macro required.


All times are GMT +1. The time now is 12:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com