Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
mohd21uk via OfficeKB.com
 
Posts: n/a
Default Hide Rows if cell value is

I would like to hide a row if certain values are entered in three cells. For
e.g. if United Kingdom is selected in Cell C3 and C5 and CI is selected from
cell C10, I would then have Row 16 hidden. I would like this to be
dynamically i.e. updated whenever the value in the cell changes.

Many thanks in advance.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200605/1
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Norman Jones
 
Posts: n/a
Default Hide Rows if cell value is

Hi Mohd,

Try:

'=============
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range

Set rng = Me.Range("C3,C5,C10")

If Not Intersect(rng, Target) Is Nothing Then
Rows(16).EntireRow.Hidden = Range("C3").Value = _
"United Kingdom" And Range("C5").Value = _
"United Kingdom" And Range("C10") = "C1"
End If
End Sub
'<<=============

This is worksheet event code and should be pasted into the worksheets's code
module (not a standard module and not the workbook's ThisWorkbook module):

Right-click the worksheet's tab
Select 'View Code' from the menu and paste the code.
Alt-F11 to return to Excel.


---
Regards,
Norman



"mohd21uk via OfficeKB.com" <u20517@uwe wrote in message
news:6056580dee09e@uwe...
I would like to hide a row if certain values are entered in three cells.
For
e.g. if United Kingdom is selected in Cell C3 and C5 and CI is selected
from
cell C10, I would then have Row 16 hidden. I would like this to be
dynamically i.e. updated whenever the value in the cell changes.

Many thanks in advance.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...l-new/200605/1



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
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
hide rows based on cell value dummster New Users to Excel 1 February 15th 06 11:37 PM
hide rows based on value in cell dummster Excel Discussion (Misc queries) 0 February 15th 06 03:27 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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

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

About Us

"It's about Microsoft Excel"