Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Columns AV:BE Showing (Not Suppose To)

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Columns AV:BE Showing (Not Suppose To)

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Columns AV:BE Showing (Not Suppose To)

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Columns AV:BE Showing (Not Suppose To)

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Showing totals from two columns Kristin Excel Discussion (Misc queries) 3 January 6th 05 07:57 PM
macro ...if command, I suppose... Mario Excel Discussion (Misc queries) 4 December 11th 04 12:34 PM
macro ...if command, I suppose... Mario[_9_] Excel Programming 4 December 10th 04 10:12 AM
macro ...if command, I suppose... Mario Excel Worksheet Functions 0 December 9th 04 11:29 AM
Showing and hiding columns BatMan Excel Programming 1 July 21st 04 06:11 PM


All times are GMT +1. The time now is 02:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"