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
>
|