LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
CH CH is offline
external usenet poster
 
Posts: 3
Default Macro to hide column based on value on another sheet

I need help with a Macro to hide a column on one sheet with a (yes/no)
value from another sheet.

(So if cell D26 value = Yes then Hide Column H on Sheet named BOY)

Here is the code I am trying to use that creates an error......

If UCase(Range("D26").Value) = UCase("YES") _
Then
Sheets("BOY").EntireColumn("H").Hidden = False
ElseIf UCase(Range("D26").Value) = UCase("NO") _
Then
Sheets("BOY").EntireColumn("H").Hidden = True
End If

 
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
Macro to Hide rows based on value of column F Scott Marcus Excel Discussion (Misc queries) 10 October 27th 06 11:57 PM
Macro to hide column based on header name [email protected][_2_] Excel Programming 6 October 11th 06 10:09 PM
Hide/unhide sheet macro based on cell calculation Greg Fisher Excel Programming 3 May 26th 05 05:58 PM
MACRO - copy rows based on value in column to another sheet Mike Excel Programming 2 March 5th 05 12:21 AM
macro to hide column based on header Todd[_6_] Excel Programming 6 September 4th 03 04:34 AM


All times are GMT +1. The time now is 02:31 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"