Macklemore
New Member
- Joined
- Mar 27, 2013
- Messages
- 3
Hi,
I am very new to VBA. Yes I know it's 2013 but I'm seeing the value in it for the first time. Everything I did prior to this was child's play, not that this is complex to most of you all.
I'm looking to see if there is a way to hide rows and columns via VBA in excel.
Cell b1 contains a company name from a pick list
Cell c1 contains an ever changing column name
Row A2:AM2 contains column names
Row B3:B70002 contains the names of 12 companies
Cell AE2:AM2 contain column names. One of these column names will be displayed in Cell C1
So what I need is;
1. Hide all rows that are not equal to the values in cell B1
2. Hide all columns in the AE:AM range whose AE2:AM2 cells do not equal the value in cell C1
3. All columns AE:AM should hide/unhide if the values in C1.
4. All rows A3:AM70002 should hide/unhide if the values in B1 change.
Any help would be much appreciated.
I am very new to VBA. Yes I know it's 2013 but I'm seeing the value in it for the first time. Everything I did prior to this was child's play, not that this is complex to most of you all.
I'm looking to see if there is a way to hide rows and columns via VBA in excel.
Cell b1 contains a company name from a pick list
Cell c1 contains an ever changing column name
Row A2:AM2 contains column names
Row B3:B70002 contains the names of 12 companies
Cell AE2:AM2 contain column names. One of these column names will be displayed in Cell C1
So what I need is;
1. Hide all rows that are not equal to the values in cell B1
2. Hide all columns in the AE:AM range whose AE2:AM2 cells do not equal the value in cell C1
3. All columns AE:AM should hide/unhide if the values in C1.
4. All rows A3:AM70002 should hide/unhide if the values in B1 change.
Any help would be much appreciated.