Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Morning Guys,
The script below hides selected columns however columns AV:BE are hiding but they are also including column AU and BF. Columns AU and BF are not supposed to hide. Please see below. If Range("B44") = Range("BD15") Then Range("E:L,N:W, AB:AD,AK:AR,AV:BE").Select Selection.EntireColumn.Hidden = True Range("A45").Value = "After Hours Working" Else Would there be a problems in the script above? Cheers |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The code looks ok to me.
But if AU and BF are hidden to start, they'll be hidden at the end, too. If that's not it, do you have any merged cells that include cells from column AU and BF and cells in a column being hidden? chinny wrote: Morning Guys, The script below hides selected columns however columns AV:BE are hiding but they are also including column AU and BF. Columns AU and BF are not supposed to hide. Please see below. If Range("B44") = Range("BD15") Then Range("E:L,N:W, AB:AD,AK:AR,AV:BE").Select Selection.EntireColumn.Hidden = True Range("A45").Value = "After Hours Working" Else Would there be a problems in the script above? Cheers -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Morning Dave,
Cheers for the advice. Yes there is a merge field which is affecting it. I've taken that into account now and it works perfectly fine. Thanks for your help. "Dave Peterson" wrote: The code looks ok to me. But if AU and BF are hidden to start, they'll be hidden at the end, too. If that's not it, do you have any merged cells that include cells from column AU and BF and cells in a column being hidden? chinny wrote: Morning Guys, The script below hides selected columns however columns AV:BE are hiding but they are also including column AU and BF. Columns AU and BF are not supposed to hide. Please see below. If Range("B44") = Range("BD15") Then Range("E:L,N:W, AB:AD,AK:AR,AV:BE").Select Selection.EntireColumn.Hidden = True Range("A45").Value = "After Hours Working" Else Would there be a problems in the script above? Cheers -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It's not being hidden in that snippet of code. Try stepping through it to
see if you can find where it's happening. HTH, Barb Reinhardt "chinny" wrote: Morning Guys, The script below hides selected columns however columns AV:BE are hiding but they are also including column AU and BF. Columns AU and BF are not supposed to hide. Please see below. If Range("B44") = Range("BD15") Then Range("E:L,N:W, AB:AD,AK:AR,AV:BE").Select Selection.EntireColumn.Hidden = True Range("A45").Value = "After Hours Working" Else Would there be a problems in the script above? Cheers |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Showing totals from two columns | Excel Discussion (Misc queries) | |||
macro ...if command, I suppose... | Excel Discussion (Misc queries) | |||
macro ...if command, I suppose... | Excel Programming | |||
macro ...if command, I suppose... | Excel Worksheet Functions | |||
Showing and hiding columns | Excel Programming |