Row and Column Viewing

  • Thread starter Thread starter RudeRam
  • Start date Start date
R

RudeRam

I have a spreadsheet that I received that only shows A1 through P20.
How can I do this on spreadsheets that I have so that I only show the
row and columns that have data in them?
 
You can hide the unused rows/columns and or reset the scroll area. Try both
to see which you like.

Private Sub Workbook_Open()
Sheets("sheet1").ScrollArea = "$A$1:$C$12"
End Sub
 
Rude

You can hide the rows and columns you don't want used and protect the sheet
after un-locking A1:P20.

If using Excel 2002 or 2003 you have many options for selecting on a protected
sheet.

See options under Tools>Protection>Protect Sheet.

You may want to try setting the Scroll Area.

This setting will not remain after closing the file.
Place a code line in the Workbook open event to set it
each time when you open the workbook

Private Sub Workbook_Open()
Sheets("Sheet1").ScrollArea = "A1:P20"
End Sub

Adjust to your sheetname and range.

Gord Dibben Excel MVP
 

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

Back
Top