Columns AV:BE Showing (Not Suppose To)

G

Guest

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
 
D

Dave Peterson

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

Guest

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top