Hide Unused Cols & Rows in a Range

  • Thread starter Thread starter Bob Maloney
  • Start date Start date
B

Bob Maloney

Hi,

XL2K

I have a range of cells C3:BB54 that form a type of matrix.

Within this range, D3:BA3 is dynamically filled with text entries.
Cells C4:C53 mirror these text entries.

Cells D4:BA53 house formulae which are dynamically filled, subject to
there being corresponding entries in Row 3 and Col C. (eg X10 is
subject to X3 and C10).

Cells D54:BB54 total the individual columns.

Cells BB4:BB53 total the individual rows.

What I would like to do, by way of code, is hide those columns in the
range D3:AX3 that are not used, together with those rows (C4:C53) that
are also not used.


Any assistance greatly appreciated.

Cheers

Bob
Maitland Australia
 
Sorry, the last paragraph should read:

What I would like to do, by way of code, is hide those columns in the
range D3:BA3 that are not used, together with those rows (C4:C53) that
are also not used.


Cheers

Bob
 
Range("D3:BA3").SpecialCells(xlCellTypeBlanks).EntireColumn.Hidden = True
Range("C4:C53").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True


Chrissy.


Bob Maloney wrote
 
Back
Top