Hide Unused Cols & Rows in a Range

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
 
B

Bob Maloney

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
 
C

Chrissy

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


Chrissy.


Bob Maloney wrote
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top