Get Array of Hidden Rows and Columns indices

tttmack

New Member
Joined
Dec 17, 2014
Messages
16
Is there a way to get an array of all the indices of the hidden rows and columns within a worksheet?

I would like to do this without any looping, perhaps using Range.Find() if its possible or whatever is most efficient. Ideally I would like to have two functions (FindHiddenRows and FindHiddenCols) each that return an array of integers.


Efficiency is very important to me, as I would like to be able to translate this code from VBA to VSTO (C#). VSTO is very slow at repeatably interacting with the Excel object model, so looping is not a solution that would work for me.


Thanks for your help!
 

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

sheetspread

Well-known Member
Joined
Sep 19, 2005
Messages
5,117
specialcells will give you the visible ones without a loop, you can then use that to get the hidden ones
 

tttmack

New Member
Joined
Dec 17, 2014
Messages
16
thanks so much!

exactly what i was looking for and should be very efficient
 

Watch MrExcel Video

Forum statistics

Threads
1,098,988
Messages
5,465,847
Members
406,450
Latest member
gunner12

This Week's Hot Topics

Top