Finding the Hidden Status of a Given Column (Solution)

Jeffrey Mahoney

Well-known Member
Joined
May 31, 2015
Messages
2,742
Office Version
  1. 365
Platform
  1. Windows
I searched the internet to find a way to get the status of a column to determine if the column is collapsed in a group or manually hidden. MS needs to create a new function =COLUMNHIDDEN() and ROWHIDDEN().

This formula uses the CELL function to return the width. Unfortunately CELL now returns an array with the Width of the column and a Boolean value for the Default width (Office 365). I needed only the column width. If zero, the the column is hidden. I used the LARGE function to return the first part of the array (Width). I used INDEX to get the cell I need by providing the the entire row 1 and the column I wanted to test ($A6).

=IF(LARGE(CELL("width",INDEX(MasterData!$1:$1,1,$A6)),1)=0,"Hidden","Visible")

Be aware: Excel does not recalculate formulas when you manually hide or unhide a column. It will recalculate when you collapse or expand a column group.

Jeff
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,213,482
Messages
6,113,908
Members
448,532
Latest member
9Kimo3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top