Hide Worksheet Based On The Value In A Cell

Jun 19, 2009

If Sheet1!A1 = FALSE, I want to hide Sheet2. If the value of Sheet1!A1 changes to TRUE, I want Sheet2 to be visible.

View 2 Replies


ADVERTISEMENT

Macro To Hide / Unhide Worksheet Based On Cell Value

Jul 18, 2010

I would like to create a macro/vb code that will unhide a worksheet if cell value is greater than zero, or hide the worksheet if the cell value is zero.

I'm not too familiar with VB code and was wondering if this is possible? I have my doubts, since it means that the code must constantly be running in an endless loop, checking to see if the value has changed?

View 9 Replies View Related

Hide Columns Based On Date Value In Cell (Worksheet Change Event)

May 23, 2014

Hide Columns based on Date value in cell (Worksheet Change event)Looking for a worksheet_change event macro that will automatically hide columns based on a value in cell S3. S3 is a data validation pick list of months based on the 1st day of each (e.g. 1/1/2014, 2/1/2014, 3/1/2014, etc.). I have date columns in row 6 from columns T through AQ. These values are 1/1/2014 (T6), 2/1/2104 (U6), 3/1/2014 (V6)....12/1/2015 (AQ6). I would like to hide columns that have a date in row 6 (T6:AQ6) that is LESS THAN (<) the date in S3 after the cell is value is changed.

View 2 Replies View Related

Show/Hide Worksheet Command Button Based On Cell Value Being In Another Range

Apr 8, 2008

i have a workbook with two sheets. i have a command button on sheet 1 that inserts another worksheet from another workbook based on a cell value in sheet 1. i would like this specific command button on sheet 1 to be hidden or disabled until a value is entered into a certain cell on sheet 1 that matches a value in a named range on sheet 2.

View 7 Replies View Related

Make Rows Hide In One Worksheet Based On Value In Another?

Apr 30, 2012

I have a worksheet "Feature Segments" that has a value in cell B40 and C40, if the value in these is "Off (Default)" then I need rows 22 and 23 on Worksheet "Summary" to hide.

I have put this code on the features segment tab but it is not working.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address = "B40" Then

[Code].....

View 3 Replies View Related

How To Hide Specific Rows Based On Values In A Different Worksheet

Mar 7, 2014

Say I have two worksheets, "Sheet1" and "Sheet2". Let's also say A1 in Sheet1 could have one of four values: cat, dog, rabbit, mouse. Now, based on which value cell A1 on Sheet1 is, I need different rows hidden in Sheet 2. For argument sake let's say if cat is chosen rows 1-5 are hidden, if dog, 6-10 and so on.

View 5 Replies View Related

Hide/Show UserForms Based On Workbook And Worksheet

Sep 6, 2007

I'm just beginning to work with userforms and have created a couple of forms for workbook navigation. The Menu form is set to appear only on the menu worksheet and the Navbar form is set to show on several database sheets. Both forms are set th hide when the workbook is deactivated.

Private Sub Workbook_Deactivate()
Menufrm.Hide
Navbar.Hide
End Sub

The problem is that when I return to the workbook the forms do not unhide. Using the workbook_activate event causes both forms to show simultaneously. I also have the worksheet_activate event set to show the applicable form.

Private Sub Worksheet_Activate()
Application. ScreenUpdating = False
ActiveWindow.DisplayGridlines = False
Navbar.Show
Navbar.Left = Range("B3").Left
Navbar.Top = Range("B3").Top
Application.ScreenUpdating = True
End Sub

Upon returning to this workbook, I only want the appropriate form to show relative to the worksheet that is active. That is, if I was on sheet2 when I switched to another workbook, sheet2 would be active when I return to the workbook and should show the Navbar form. The menu form should show on sheet1, and the navbar form on sheets 2-5. How do I get the correct form to show when I re-activate the workbook?

View 4 Replies View Related

VBA Excel - Hide Worksheet On Date Cell Value

Jan 9, 2014

I have a workbook that contains 14 worksheets. I have been looking for vba code that hides 3 of these sheets according to a date value. The date value is situated on sheet 1 cell B7. The 3 sheets I wish to hide are sheets 2, sheets 3 and sheets 4. These 3 sheets are required to be made unhidden until 3 days before date in sheet 1 cell B7. From the date value I want the workbook to hide the 3 sheets and can only be unhidden if a correct password is used to unhide these 3 sheets.

View 4 Replies View Related

Hide Multiple Rows When The Text Changes In A Cell On A Worksheet

Oct 28, 2009

The workbook has multiple sheets, and a cover sheet. Each project has a sheet and the status, costs, updates ect. are updated to the cover sheet.

Problem:
What happens is there is a cell which has conditional formatting on it, e.g. If text is Green then colour cell green, if cell text is amber then colour amber and if cell text is Red then colour Red. This works fine.

If the cell text is green then I need a number of rows hidden, if it is amber or red then show the rows.

I have found the following
Sub
If Target.Value = 1 Then
Rows(Target.Row).RowHeight=0
Else
End If
End Sub

Which I have changed to:

Sub
If F4.Value = Green Then
Rows("5,6,7,8,9,10.Row).RowHeight=0
Else
End If
End Sub

So this does not work, need to know why and how to make this work for each sheet I am on e.g. ActiveWorksheet?

View 9 Replies View Related

Hide Certain Ranges In Different Worksheets According To The Assigned Cell Value In The First Worksheet

Jan 22, 2010

I have got a macro (from Mr Excel's MVP) that hide certain cells according to assigned cell value
What I need is:
to hide certain ranges in different worksheets according to the assigned cell value in the first worksheet

if sheets1.cell A1= "hi" then
range (" goooo") in sheet 1.hide
range ("deeeee")in sheet 2 .hide
range ("faaaaa") in sheet 3.hide
the macro I had is :
====================================
====================================
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Target.Value = "hi" Then
Worksheets("Sheet1").Rows(2).Hidden = True
Else
Worksheets("Sheet1").Rows(2).Hidden = False
End If
End If
End Sub

View 9 Replies View Related

Row Hide Based On Cell Value?

Mar 21, 2014

formula on the attached spreadsheet (Questions UK) I would like the following to happen:

If D3 is YES then rows 91 to 319 hide
If D3 is NO then rows 6 to 89 hide
If D4 is YES then rows 6 to 89 hide and 164 to 319 hide
If D4 is NO then rows 91 to 162 hide
If D5 is YES then row 6 to 162 hide
If D5 is NO then row 164 to 319 hide

View 6 Replies View Related

Hide Row Based On Cell Value?

Jan 2, 2014

automatically hiding a row(s) based on a cell value.

I have various numbers on column K, rows 12-47.

Example:
k12=680
k13=76.38
k14=0
k15=55.33
k16=0
etc.

In the above example, I would like row 14 and 16 to automatically hide (and unhide if the formula calls for the cell to be greater than 0)

View 5 Replies View Related

Hide Row Based On Cell Value ..

Jan 9, 2009

I would like a macro where I it will examine Cells A8 down to A27 to see if there is a value. If there isn't a value, I want that row hidden. I would like for it to always run (i.e. if a value is put into that cell, the row reappears, otherwise it is always hidden).

View 9 Replies View Related

Way To Hide Row Based On The Value Of A Particular Cell

Oct 27, 2003

I have a worksheet with an age row of 20 - 99 (and a bunch of other data)

A user enters the starting age, and then the sheet fills in the rest of the cells.

If the user enters 50, the age fills from 50 to 130.

Before printing, I manually hide the rows (using the hide row command) over age 99.

Is there an easy way to do this without macros? I am Excel impaired!

I tried using Auto filter - but I have to rerun the filter each time (it is not automatic).

View 9 Replies View Related

Hide Worksheets Based On A Cell Value?

Jan 29, 2014

I am in need of a macro to hide worksheets that do not match a certain cell value (which I have range named) in the "input data sheet". If this value matches cell value on the other worksheets, then hide all other worksheets and keep the "valid" worksheet visible

NVS_SCN is the range name that needs to be compared to the value in P4 of worksheets 2 thru 4

Example: NVS_SCN (located on the LANDFILL_DATA wksht) = RC_SOUTHLF
I want the Macro to hide all worksheets except for the South Region LF_VOL_Trend sheet,

if NVS_SCN = RC_MWESTLF then hide all but Midwest Region LF_Vol_Trend

I am attaching a file. I have seen macros to "unhide" or "Hide Rows or Columns" but I am not adept enough to figure out how to utilize range names and hide all but the one I want. As for "recording" the macro, I didn't know how to do the compare part.

View 13 Replies View Related

Hide Row Based On Other Cell Value (Filter)

May 5, 2009

i have been able to get most of my VB work on my own (i'm learning). Currently I'm having a bit of difficulty in hiding a row based on a cell value, potentially due to cells being merged.

I'd like to select from a dropdown cell to filter on a row's value. Attached you will find a sample sheet that works named "Working" in it's current state and the one "TEST" that does not filter every other line item.

View 3 Replies View Related

Hide Rows Based On Value In Cell G2

Nov 18, 2011

I am using windows 7, and excel 2007. I want to hide rows bases on a value in cell G2 which is a date field

Example, if G2 is greater than 11/16/2011 then hide rows 1969 through 2032.

View 6 Replies View Related

Hide Row Based On Text In Cell

Feb 8, 2012

I am looking for some macro code that will hide all rows except for those with certain text (i.e. W-NT or S1-DT). The cell range to search is C22-OU500.

View 5 Replies View Related

VBA Hide Rows Based On Cell Value

Mar 27, 2012

With a piece of code that will hide an entire row if a cell value in that row does not equal the cell value of another row.

Example

Cell d3 = Feb 2012.

Range C5:c252, = a mix of Feb 2012 and Mar 2012.

I want to hide all the Mar 2012.

However if Cell d3 = Mar 2012 then the range C5:C252 will also = Mar2012

I want to see all the rows within that range.

View 4 Replies View Related

Hide Rows Based Upon Value In Cell?

Apr 9, 2014

I am trying to auto hide rows in a spread sheet. the start row will always be 55 and the end row will be 55 + the value of cell A38 in sheet titled "Main".

View 2 Replies View Related

Hide Object Based Cell Value

Sep 14, 2006

I have 2 equation objects created with microsoft equation 3.0. I have named the equation objects Eqn9 and Eqn10. I also have an if function, what i would like to do is if a number in cell AC58 is greater than 0.3 a macro runs and hides Eqn9 and shows Eqn10, similarly if the number in cell Ac58 is less than or equal to 0.3 the macro hides Eqn 10 and shows Eqn9.

View 8 Replies View Related

Hide Rows Based On Cell Value Inputted From Another Tab

Dec 13, 2013

In this example on Sheet 2, I'm trying to hide rows 1-6 if 'E6' is 0, and hide rows 15-26 if 'E18' is 0. These cell values are equal to the same cell in Sheet 1.

I've tried different codes I've found online, but I'm not very experienced with VBA so I can't get it to work. I can get rows 1-6 to hide, but it doesn't do it automatically whenever a zero is inputed into Sheet 1. It only works if I enter something into another cell on Sheet 2.

VB:

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("E6") = 0 Then
Rows("1:6").Select
Selection.EntireRow.Hidden = True

[Code]...

View 5 Replies View Related

Hide Or Show An Image Based On A Cell Value

Mar 31, 2009

I have a spreadsheet with two bitmap images inserted into it. In cell E2, I will enter a number, either a 1 or a 2. if I enter a 1, I want only the first image to be visible. If I enter a 2, I only want the second image to be visible. Is there a way to accomplish this (hopefully without the need for macros)? I've attached a spreadsheet as an example of what I'm trying to do. Also, note that I'd like the images to be stacked on top of each other so that they show up in the same place regardless of wether there's a 1 or a 2 in cell E5

View 13 Replies View Related

How To Hide Command Button Based On Another Cell

Jan 16, 2010

I have a command button on a worksheet, not in a user form. I know the command button has a property called Visible that I can manually set to False.

I want to set this property to False if the value of the B3 cell is less than 2.000

View 7 Replies View Related

Hide Command Button Based On Another Cell?

Jan 28, 2014

How to hide command button based on another cell?’ [URL] .....

This works faultlessly but for only 1 Button. I tried adding in the code again for a second Button but it creates a conflict. I made a slight adjustment to your original code, to show the button when the cell is populated, which works well…

[Code] .....

Any way I can:-

1. Add additional buttons which reference their own cell?

CommandButton4 – H9
CommandButton6 – I9
CommandButton2 – Q9
CommandButton3 – S9

2. And add one button which activates based on one of 3 cells?

CommandButton1 – J9 &/or V9

View 5 Replies View Related

How To Hide/undide A Row, Based On A Cell Value (Macro)

Jun 8, 2009

I have the data as follows:

columns B,c,d,e,f,g,h contains data and column A is empty.

What i want is

1. Initially columns c,d,e,f,g,h should be hidden. Only a & b should be visible
2. if i enter a 0 (zero) in A1, then, columns B,c,d,e,f,g,h should remain hidden, for row-1.
3. if i enter a 1 (one) in A1, then, columns B,c,d,e,f,g,h should be visible, for row-1.

View 10 Replies View Related

How To Hide/unhide Rows Based On Cell Value

Jun 17, 2009

I'm using column A as a reference. My data starts in cell A3.

Whenever theres a zero in any cell in column A I would like that row to hide.
If the row was hidden and the value changes to any number greater than zero I need the row to unhide.

I can record two macros for the hide/unhide part of this but I dont understand how to run them based on cell value.

View 14 Replies View Related

How To Hide Command Button Based On Another Cell?

Jan 16, 2010

I have a command button on a worksheet, not in a user form. I know the command button has a property called Visible that I can manually set to False.

I want to set this property to False if the value of the B3 cell is less than 2.000

View 2 Replies View Related

Hide & Unhide Columns Based On A Cell Value

Feb 21, 2010

worksheet I am working on at the moment, basically if row 5 has a 0 displayed I want that column to hide, but if row 5 has text of any value displayed I want it to unhide, the range is E5 to BA5 across.

I have draft VBA code as follows:

View 9 Replies View Related

Macro To Hide Rows Based On Cell Value

Jun 17, 2003

Like to create a macro (button) to hide / unhide rows based on a cell value
Example
A1=No then hide roa A
C1=No then hide row c

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved