Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Looking for a macro to hide any columns from columns "W" through "HE"
if the cell in that column in row 4 is equal to zero (a formula exists in the row 4 cell.) Also, I surmise, if the macro includes the word "true", I can change that to "false", and get a macro to open all the closed columns? Thanks for any suggestions. Pierre |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Right click the sheet tab, view code and paste this in and run it. Changing True to false unhides Sub mariner() Set myrange = Range("W4:HE4") For Each c In myrange If Not IsEmpty(c) And c.Value = 0 Then c.EntireColumn.Hidden = True End If Next End Sub Mike "Pierre" wrote: Looking for a macro to hide any columns from columns "W" through "HE" if the cell in that column in row 4 is equal to zero (a formula exists in the row 4 cell.) Also, I surmise, if the macro includes the word "true", I can change that to "false", and get a macro to open all the closed columns? Thanks for any suggestions. Pierre |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On May 30, 2:08*pm, Mike H wrote:
Mike, worked like a charm. Thanks so much! Pierre Hi, Right click the sheet tab, view code and paste this in and run it. Changing True to false unhides Sub mariner() Set myrange = Range("W4:HE4") For Each c In myrange If Not IsEmpty(c) And c.Value = 0 Then c.EntireColumn.Hidden = True End If Next End Sub Mike |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Your welcome
"Pierre" wrote: On May 30, 2:08 pm, Mike H wrote: Mike, worked like a charm. Thanks so much! Pierre Hi, Right click the sheet tab, view code and paste this in and run it. Changing True to false unhides Sub mariner() Set myrange = Range("W4:HE4") For Each c In myrange If Not IsEmpty(c) And c.Value = 0 Then c.EntireColumn.Hidden = True End If Next End Sub Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count based on criteria from two different columns | Excel Discussion (Misc queries) | |||
Hiding rows based on a criteria thru and event proceedure | Excel Worksheet Functions | |||
Need to count based on different criteria in two columns | Excel Worksheet Functions | |||
Sum based on criteria in rows and columns | Excel Discussion (Misc queries) | |||
Hiding columns based on user/password | Excel Worksheet Functions |