how do you get a worksheet to only display say columns A-Z and Row 1-50?
Display Only few rows and columns
(15 posts) (3 voices)-
Posted 1 year ago #
-
Hide columns AA:IV and rows 51:65536?
Posted 1 year ago # -
Hide all the Rows/Columns beyond what you want to see
or here is a simple VBA code that will toggle these area from Hidden to Visible
Sub HideRowsCols() If Application.Version < 13 Then Columns("AA:IV").EntireColumn.Hidden = Not Columns("AA:IV").EntireColumn.Hidden Rows("51:65536").EntireRow.Hidden = Not Rows("51:65536").EntireRow.Hidden Else Columns("AA:XFD").EntireColumn.Hidden = Not Columns("AA:XFD").EntireColumn.Hidden Rows("51:1048576").EntireRow.Hidden = Not Rows("51:1048576").EntireRow.Hidden End If End SubPosted 1 year ago # -
Thx,
i added the code saved it as Macro-enabled but it does not workPosted 1 year ago # -
What doesn't work? The macro bugs out? The columns don't hide?
Posted 1 year ago # -
your process works if i want to sit there and hide the rows and columns, tedious task.
the columns and rows that i dont hide. all i changed was the number and column.
Sub HideRowsCols()
If Application.Version < 13 Then
Columns("g:IV").EntireColumn.Hidden = Not Columns("g:IV").EntireColumn.Hidden
Rows("21:65536").EntireRow.Hidden = Not Rows("21:65536").EntireRow.Hidden
Else
Columns("g:XFD").EntireColumn.Hidden = Not Columns("g:XFD").EntireColumn.Hidden
Rows("21:1048576").EntireRow.Hidden = Not Rows("21:1048576").EntireRow.Hidden
End IfEnd Sub
Posted 1 year ago # -
My code with your Modification works perfectly?
What do you want to do ?
What version of Excel are you using ?
Posted 1 year ago # -
2007, i have a spreadsheet that someone sent to me that only displays columns a-f and row 1-19. they are not hidden and when i view the code for the sheet or workbook there is no code such as yours. i have possed the question to the person who sent it to me but they have no idea as the workbook was sent to them from another source.
Posted 1 year ago # -
is there a way for me to upload an example?
Posted 1 year ago # -
Use my code to undo it and then delete the code
Posted 1 year ago # -
Posting file refer here:
http://chandoo.org/forums/topic/posting-a-sample-workbookPosted 1 year ago # -
Ahhh haaaa, got it. but didnt use the code....
Posted 1 year ago # -
and the solution was ?
Posted 1 year ago # -
https://skydrive.live.com/redir.aspx?cid=2b770c659a94550d&resid=2B770C659A94550D!102&authkey=jDtHRZDizDc%24
Posted 1 year ago # -
just hide the columns and rows manually
Posted 1 year ago #
Reply
You must log in to post.

