Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Hide Column based on Cell Value

I am trying to hide an entire column - column M, based on the value in Cell
I13.

I would like column M to be hidden if the value in I13 is "".

I am a novice with VB, and have tried numerous things without any luck. Any
suggestions or help would be appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Hide Column based on Cell Value

On 20 Jun., 21:11, tomic wrote:
I am trying to hide an entire column - column M, based on the value in Cell
I13.

I would like column M to be hidden if the value in I13 is "".

I am a novice with VB, and have tried numerous things without any luck. Any
suggestions or help would be appreciated.


Hi

This is an event code, which needs to be in the codesheet for the
desired sheet.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$I$13" Then
If Target.Value = "" Then
Columns("M").Hidden = True
Else
Columns("M").Hidden = False
End If
End If
End Sub

Regards,
Per
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Hide Column based on Cell Value

Thanks very much. That did exactly what I wanted it to do.


"Per Jessen" wrote:

On 20 Jun., 21:11, tomic wrote:
I am trying to hide an entire column - column M, based on the value in Cell
I13.

I would like column M to be hidden if the value in I13 is "".

I am a novice with VB, and have tried numerous things without any luck. Any
suggestions or help would be appreciated.


Hi

This is an event code, which needs to be in the codesheet for the
desired sheet.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$I$13" Then
If Target.Value = "" Then
Columns("M").Hidden = True
Else
Columns("M").Hidden = False
End If
End If
End Sub

Regards,
Per

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
Hide or Unhide Column Based on Cell Value windsurferLA Excel Programming 2 March 31st 06 11:06 PM
Hide column or row based on a cell in the column or row? SacGuy Excel Discussion (Misc queries) 0 January 24th 06 06:51 PM
Hide Row/s (single/grouped) based on cell value of column in the r JB2005 Excel Programming 0 October 27th 05 09:49 PM
Hide/Unhide column based on cell value DRK Excel Programming 2 August 8th 05 04:17 PM
Hide column based on data value Jay Excel Discussion (Misc queries) 1 March 25th 05 01:40 AM


All times are GMT +1. The time now is 12:27 AM.

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"