Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Macro to Hide columns

Good afternoon,
I am trying to create a macro to hide certain columns on a spreadsheet, how
best do i do this, say want to hide columns g, h, u, ac & ae
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Macro to Hide columns

The best way is to record the macro. Turn on the macro recorder, hide your
columns, then stop the recorder. You can then look at the code by pressing
alt+F11.

Regards,
Fred.

"whatzzup" wrote in message
...
Good afternoon,
I am trying to create a macro to hide certain columns on a spreadsheet,
how
best do i do this, say want to hide columns g, h, u, ac & ae


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Macro to Hide columns

Sub Macro()
Range("G1,H1,U1,AC1,AE1").EntireColumn.Hidden = True
'OR
'Range("G:G,H:H,U:U,AC:AC,AE:AE").Columns.Hidden = True
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"whatzzup" wrote:

Good afternoon,
I am trying to create a macro to hide certain columns on a spreadsheet, how
best do i do this, say want to hide columns g, h, u, ac & ae

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Macro to Hide columns

Hi,

Range("G:H, U:U, AC:AC, AE:AE").EntireColumn.Hidden = True

Mike

"whatzzup" wrote:

Good afternoon,
I am trying to create a macro to hide certain columns on a spreadsheet, how
best do i do this, say want to hide columns g, h, u, ac & ae

Reply
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
Auto Hide-Unhide Columns with a macro Ed Excel Discussion (Misc queries) 0 March 8th 07 07:57 PM
Macro to hide the row if both columns E & F are blank in that row. PCakes Excel Worksheet Functions 2 January 4th 07 10:07 PM
Need a macro to hide certain columns Dallman Ross Excel Discussion (Misc queries) 12 October 19th 06 05:58 PM
macro to hide columns Shooter Excel Worksheet Functions 2 September 27th 05 09:04 PM
how can hide and show columns using macro? Hoshyar Excel Worksheet Functions 4 September 2nd 05 03:45 PM


All times are GMT +1. The time now is 12:15 PM.

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

About Us

"It's about Microsoft Excel"