ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Hiding rows or columns based on cell contents (https://www.excelbanter.com/excel-discussion-misc-queries/213887-hiding-rows-columns-based-cell-contents.html)

Bill H

Hiding rows or columns based on cell contents
 
I am looking for a solution to hide row or columns in a worksheet based upon
a value in a cell of another worksheet.

To be more specific, I have a "setup" worksheet, with a column if entires.
I have a second worksheet, "checklist" that I would like to format according
to the entries in "setup".

If setup:A1 is empty, I want to hide columns checklist 1-3
If setup:A2 is empty, I want to hide columns checklist 4-6.

ANy ideas how to set this up automatically ?


JLatham

Hiding rows or columns based on cell contents
 
Without resorting to a macro (VBA code) to actually hide/unhide the columns,
your best bet is probably going to be to use conditional formatting in the
checklists so that when a cell on the setup worksheet is empty (="") then the
font changes to the same color as the cell's background color.

"Bill H" wrote:

I am looking for a solution to hide row or columns in a worksheet based upon
a value in a cell of another worksheet.

To be more specific, I have a "setup" worksheet, with a column if entires.
I have a second worksheet, "checklist" that I would like to format according
to the entries in "setup".

If setup:A1 is empty, I want to hide columns checklist 1-3
If setup:A2 is empty, I want to hide columns checklist 4-6.

ANy ideas how to set this up automatically ?


Bill H[_2_]

Hiding rows or columns based on cell contents
 
Jlatham,

I did try that approach, however when I had columns in the middle of the
"checklist" I wanted hidden, I ended up with blank regions.

Is a macro difficult to create ?

Bill H

"JLatham" wrote:

Without resorting to a macro (VBA code) to actually hide/unhide the columns,
your best bet is probably going to be to use conditional formatting in the
checklists so that when a cell on the setup worksheet is empty (="") then the
font changes to the same color as the cell's background color.

"Bill H" wrote:

I am looking for a solution to hide row or columns in a worksheet based upon
a value in a cell of another worksheet.

To be more specific, I have a "setup" worksheet, with a column if entires.
I have a second worksheet, "checklist" that I would like to format according
to the entries in "setup".

If setup:A1 is empty, I want to hide columns checklist 1-3
If setup:A2 is empty, I want to hide columns checklist 4-6.

ANy ideas how to set this up automatically ?


JLatham

Hiding rows or columns based on cell contents
 
I should add to that, especially since you can't use conditional formatting
to 'test' a cell on a different worksheet. What you'd first need to do is
set up a cell on the checklist sheet linked to the cell on the setup sheet,
then set your conditional formatting to test that linked cell's value and
'hide'/'unhide' the text based on the results of the test. Note that when a
cell is linked to one that is empty, it shows up as a zero.

"Bill H" wrote:

I am looking for a solution to hide row or columns in a worksheet based upon
a value in a cell of another worksheet.

To be more specific, I have a "setup" worksheet, with a column if entires.
I have a second worksheet, "checklist" that I would like to format according
to the entries in "setup".

If setup:A1 is empty, I want to hide columns checklist 1-3
If setup:A2 is empty, I want to hide columns checklist 4-6.

ANy ideas how to set this up automatically ?



All times are GMT +1. The time now is 03:38 PM.

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