LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Hiding unused columns



Howdie,

Im trying to go from column BY all the way to the left till first column
of data is found. Then hide all columns one to the right of the last
found column.
Eg data in column g, then want to hide H to BY. (columns with data will
vary. End point is always BY)

VB below almost works - it just hides last column with data in it (ie
column G) as well, and I need it to hide column H

Sub test

Application.Goto Reference:="R1C77"
Columns("BY:BY").Select
Range(selection, selection.End(xlToLeft)).Select
selection.EntireColumn.Hidden = True

End sub

Thanks

Darin



*** Sent via Developersdex http://www.developersdex.com ***
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i delete unused row and columns ??? Irfan Khan[_2_] Excel Discussion (Misc queries) 8 January 15th 08 07:26 PM
hiding unused categories in charts Compensation Analyst Excel Discussion (Misc queries) 1 March 19th 07 09:22 PM
Having a floating row or hiding unused rows? Simon Lloyd[_764_] Excel Programming 5 June 14th 06 09:45 PM
Deleting unused columns dramajuana Excel Discussion (Misc queries) 2 June 11th 06 12:14 AM
After hiding unused columns to the right, border on right disappea Oldemom Excel Discussion (Misc queries) 0 January 17th 06 03:16 PM


All times are GMT +1. The time now is 10:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"