Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Macro that will hidden columns, rows and worksheets based on an identifier

I'm creating a wookbook where each row is indentified to a different
project as well as two columns and two work sheets. I need to hide the
rows, columns and worksheet for project A when viewing project B and
vis versa. I would like to create a macro to do this but I'm running
out of ideas. Can any one out there help?

Please note I am experienced in Excel but it is from hands on
experience so some highly technical terms may confuse me.

Thanks
Treen

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Macro that will hidden columns, rows and worksheets based on an identifier

Use one of these ideas in the sheet module where cell a1 contains the number
of
the month. This was for specific months

Sub hidecols()
Columns.Hidden = False
mc = Range("a1") + 1
Range(Cells(1, mc), Cells(1, 12)).EntireColumn.Hidden = True
End Sub

'Automatic every time you change cell a1
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$A$1" Then Exit Sub
Columns.Hidden = False
mc = Target + 1
Range(Cells(1, mc), Cells(1, 12)).EntireColumn.Hidden = True
End Sub


--
Don Guillett
SalesAid Software

wrote in message
ps.com...
I'm creating a wookbook where each row is indentified to a different
project as well as two columns and two work sheets. I need to hide the
rows, columns and worksheet for project A when viewing project B and
vis versa. I would like to create a macro to do this but I'm running
out of ideas. Can any one out there help?

Please note I am experienced in Excel but it is from hands on
experience so some highly technical terms may confuse me.

Thanks
Treen



  #3   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Macro that will hidden columns, rows and worksheets based on an id

Try Tools Macro RecordNewMacro and follow the menus and then actually
hide the columns you wish for one instance by hand and then stop
recording....you now have a macro to do that action again any time you need
it.....then do the same to clear all the hidden columns, and a third macro to
hide the other set of columns.....if you have trouble, post back.....

hth
Vaya con Dios,
Chuck, CABGx3



" wrote:

I'm creating a wookbook where each row is indentified to a different
project as well as two columns and two work sheets. I need to hide the
rows, columns and worksheet for project A when viewing project B and
vis versa. I would like to create a macro to do this but I'm running
out of ideas. Can any one out there help?

Please note I am experienced in Excel but it is from hands on
experience so some highly technical terms may confuse me.

Thanks
Treen


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
Inserting columns & rows in worksheets Wylie Coyote Excel Worksheet Functions 3 September 16th 06 09:43 PM
macro to copy multiple rows to separate worksheets OrlaH Excel Worksheet Functions 2 June 8th 06 03:15 PM
Macro pulling data from 2 worksheets billrl34 Excel Discussion (Misc queries) 2 December 12th 05 08:50 PM
macro to hide rows across several worksheets fails SandyR Excel Discussion (Misc queries) 5 October 3rd 05 09:04 PM
HELP! How do you--> Lock a set of rows but also link worksheets to FRUSTRATED Excel Discussion (Misc queries) 6 December 29th 04 10:05 PM


All times are GMT +1. The time now is 05:33 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"