View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Rookie mistake ruined spreadsheet

FormatCellsProtectionHidden will not hide rows and columns, only hides
the cell contents in the Formula Bar when you protect the worksheet.

Your file went huge due to the cells' having been "hidden" under the
Protection Tab

The reason your file size went huge was due to those cells being "hidden"
under the Protection Tab.

Changing to "unhidden" will not fix the problem since Excel now assumes your
used range is huge.

To reset that used range you must select all unused columns and EditDelete

Same for unused rows.

Now you would save the workbook to reduce the size. If you don't save,
Excel will still think the used range is huge.

Now......back to what you wanted in the first place.

To hide unused rows, select the rows with SHIFT + End + DownArrow

Then FormatRowsHide.

Same for columns.


Gord Dibben MS Excel MVP

On Wed, 4 Mar 2009 10:40:22 -0800, Kirk Christian
wrote:

In Excel, I tried to hide unused columns and rows. But I did it by selecting
the first unused column, used CTRL+SHIFT+RIGHT ARROW, right-clicked an empty
cell, went to Format Cells, clicked the Protection tab, then checked
“Hidden”. I hid the unused rows in the same manner. It worked, but my file
size went from 15K to 3200K. I tried to undo the mistake by using CTRL+Z,
doing the same technique to unhide, clearing formatting, and deleting columns
and rows on the used cells, but it remained an extra large file. I ended up
copying the valid cells to a new workbook to correct the mistake, but I am
still baffled as to what happened. Do you have any suggestions ho to remove
the unused cells from a spreadsheet, in case I make the same mistake again?