Hide Column Based On Another Sheets Cell Value

Apr 16, 2008

There are 2 sheets in the excel worksheet. in one sheet there would be drop downs
the 2nd sheet will have 4 columns A,B,C,D) Depending on the selection in sheet1. If a1 = Y then columnA in the 2nd sheet should be hidden. If a1 = N then columnB in the 2nd sheet should be hidden. how can this be done..The key is the columns to be hidden are on a different sheet and that is where I am having the difficulty.

View 3 Replies


ADVERTISEMENT

Macro To Hide Column Based On Row Value (multiple Sheets)

Jan 29, 2014

I would like to have a macro that will hide a column based on the value in the row. I have multiple sheets and if row 4 (or more specific, B4:AL4) contains a zero, then I'd like the whole column to be hidden on that sheet. I'd like to be able to run the macro and it evaluate every worksheet.

View 5 Replies View Related

VBA To Hide/Unhide Sheets Based On Cell Value

Jun 2, 2008

I have a workbook which has roughly 50 sheets. What I'm trying to do is automatically hide/unhide sheets based on the cell values in the first sheet. So in sheet1 cell A1 i would a value of FALSE which would trigger sheets1, 2, & 3 to hide, when that value changes to TRUE then those same sheets would unhide. I need to replicate that for the 10 corresponding sets of sheets, but for each grouping of sheets a different cell in sheet1 would be the trigger, cell A2 = sheets 4 - 10, cell A3 = sheets 11 - 20, etc.

View 9 Replies View Related

Hide And Delete Sheets Based On Cell Input?

Aug 11, 2014

I have a situation where i would like to hide and delete a few sheets in my worksheet.

there is a few sheets where i want it to be constantly visible and one sheet is based on a cell reference.

the remaining irrelevant sheets i would like it to be hidden and deleted.

'always visible are sheets that are constantly visible in all files' 'visible msds is the sheet where my product data is being pulled out based on a input i enter on my first sheet' the sheets i want to hide and delete will be the remaining irrelevant "MSDS" that i would like to remove through macro.

View 3 Replies View Related

Hide/Show Sheets Based On Cell Values & Validate Entry

May 30, 2008

excal VBA programming.I have attached the file name "help" for your easy explanation purpose.

1. Is it possible to hide sheet nos. 1,2,3,4 & unhide the sheet as wished by me by puting the value (1or 2 or 3 or 4) in B3 cell.

2.There are per day production rate in E18 to E22 cell. Now whenever I will give value in H18 or H19 or H20 or H21 or H22, it will check whether the value is same with the respective E 18 or E19 or E20 or E21 or E22 cell. If both the values are not equal then give a message box "WARNING!!! YOUR VALUE IS NOT SAME". Can it be possible by creating VBA programming.

View 5 Replies View Related

Hide Rows Based On Cell Value In Column

Jun 12, 2008

I would like to hide rows (A17:A180) based on the value in the cell. If the value in a specific cell is "X", hide the row...if anything else is in the column's cell (A17, etc), show it.

View 6 Replies View Related

Hide Column Based On Cell Value For That Column

Jul 4, 2012

I have a Worksheet were I have a formula in cells from D5 to ALO5. That read "Hide" or "Unhide".

I would like the column to each hide individually hide if that column has "Hide" in in it. If it has "Unhide" in the column then it becomes visible again. The range of the columns match the formula cells which are "D" through "ALO".

View 1 Replies View Related

Hide Column And Clear Contents Based On A Cell Value In Another Sheet

Mar 19, 2009

I have a workbook with two sheets of data. I want to hide column B of Sheet2 and clear contents of range B2:B50 if the value in A1 of Sheet1 is "a".

View 2 Replies View Related

Hide Sheets Based On Criteria

Sep 3, 2006

i would like to hide different sheets at one shut. i tried this, but did not work:

Dim sh As sheet
For Each sh(1 3 5 7 9).Visible =xlSheetVeryHidden

View 6 Replies View Related

Hide Sheets Based On User Using VB In 2007

Jul 31, 2009

I see this forum and the example works perfectly in Excel 2003.. But we are using Excel 2007 now and it doesn't appear to be recognizing the user and is always refering to the "else" in the vb codes. Does this code for not work in 2007? Oh and I am refering to Post #10 on there with the attachment that will hide different sheets depending on which user is getting on the file.

View 3 Replies View Related

Hide & Show Sheets Based On Names

Dec 19, 2006

I made one file with 13 sheets.

sheet1 tab name is : MAIN
and other sheet tab name like following
2. xyz-Sales
3. xyz-Rev
4. xyz-SSN
5. xyz-ddn
6. abc-Sales
7. abc-Rev
8. abc-ddn
9. abc-ssn
10. ddd-sales
11. ddd-Rev
12. ddd-ssn
13. ddd-ddn

In Main sheet There are 3 buttons

1 . XYZ
2. abc
3. ddd

when user press on xyz button then only xyz sheets (like sheet 2 to 5) are shows to user and other sheets are very hide

if user press abc button then only abc sheets (like sheet 6 to 9) are shows to user and other sheets are very hide

i don't want to use

Sheet2.Visible = xlSheetVeryHidden

i want to use finde xyz sheet tab name and shows and other are hide.

View 9 Replies View Related

Hide Sheets Based On Data In Cells

May 25, 2007

I want to hide a sheet in an excel workbook based on a Yes or No answer in the first sheet in the file. Is there an easy way to do this?

The above operation will be repeated up to 10 times, but the decision to hide or not hide each sheet will depend on only one answer.

In some cases I want to hide several sheets based on one answer.

The overall objective is to have a flexibly sized workbook suitable for a range of users who will not be faced with sheets which are not relevant for their individual circumstances.

View 5 Replies View Related

Hide Sheets Based On Sheet Tab Color

Feb 20, 2008

I am making a new stock card system to keep track of stock at work for a new storeman working in my department. What I want to be able to do it hide/show sheets bases on their colour, the reason I want to do this is because I want the new storeman to be able colour code products and only show certain ones at any one time to stop him from having to sort through loads of sheets, but also for him to be able to add extra sheets and asign them a colour and not need me to modify code and put it into category X So in summary, I want code that will hide all sheets that colour is red or blue etc and not need updating when new sheets are added.

View 4 Replies View Related

Hide Rows Based On Condition - Multiple Sheets

Mar 7, 2008

I want by using some code I've seen on this forum or using the macro writer and then tweaking the code. So with that said, I've written the attached code but I know there is probably an easier way to write it. It cycles through about 12 sheets using the same below code, but I didn't list that code.

Sub Hide_Rows()
Dim i As Integer
For i = 3 To 418
Sheets("AFA - UMBI").Select
If ActiveSheet. Range("b" & i).Value = "2008-2" Then
Rows(i & ":" & i).EntireRow.Hidden = True
ElseIf ActiveSheet.Range("b" & i).Value = "2008-3" Then
Rows(i & ":" & i).EntireRow.Hidden = True
ElseIf ActiveSheet.Range("b" & i).Value = "2008-4" Then
Rows(i & ":" & i).EntireRow.Hidden = True
ElseIf ActiveSheet.Range("b" & i).Value = "2009-1" Then
Rows(i & ":" & i).EntireRow.Hidden = True
ElseIf ActiveSheet.Range("b" & i).Value = "2009-2" Then
Rows(i & ":" & i).EntireRow.Hidden = True
ElseIf ActiveSheet.Range("b" & i).Value = "2009-3" Then
Rows(i & ":" & i).EntireRow.Hidden = True
ElseIf ActiveSheet.Range("b" & i).Value = "2009-4" Then
Rows(i & ":" & i).EntireRow.Hidden = True
End If
Next i
End Sub

View 7 Replies View Related

Show / Hide Sheets Based On Values Of Cells In Range?

Sep 11, 2013

I have a workbook wherein I have 7 sheets.Lets say they are called Tom, Peter, John, Sia, Mia, Tia and "Home Page". I have 2 buttons for Report 1 and 2 to which I want to assign the macros.I also have a table wherein I have defined which sheets I want to show. First Column of table has sheet names from A2:A6(Home Page,Tom, Peter, John, Sia, Mia, Tia). Column 2 has report 1 sheets - Home Page, Tom, John, Mia and Column 3 has report 2 sheet names- Home Page, Peter, Sia, Tia

What I want to do is, if I click on "Report 1" button, I only want to show sheets whose names are there in cells under report 1 so for report 1 it will be Home Page, Tom, John, Mia. For Report 2, it will be Home Page, Peter, Sia, Tia. Since I have many reports I want this to be one macro. Stepwise, here is what I want

1. Click on button for Report, macro should check which report I am referring to and select the range on basis of that. Report 1 = column B, if Report 2, Range is column C.
2. Basis the range I want sheets to show or hide.

View 1 Replies View Related

Hide Button Or Textbox Based On Caption Across Multiple Sheets

Oct 16, 2009

I have a workbook with 31 sheets. Each sheet has 15 textbox button that call macros.
I would like to hide 1 textbox on all sheets until another macro is called. I know how to get the textbox names to be able to hide them, But because these text boxes were copied most of the are the same name, however on severl sheets they are different names "Textbox 4 on most sheets but it could be textbox 34 on others. The ones I want to hide all have the same text label. Is it possible to get VBA to return the label text.

View 8 Replies View Related

Hide Column Based On A Value

Jul 6, 2014

Is there any formula to hide a column based on a value . I know we can do that manually using hide and Unhide option.
but I want this to be done dynamically without A MACRO.

In the attached sample spreadsheet, the row 3 (status) has either 0 or 1 that is feed from another sheet and change dynamically. I need to hide all columns with a value 0. In this sample columns B,D,H,I,J,N & P must be hidden.Suppose If the staus value is changed from 0 to 1 then the column must be displayed (unhide).

View 1 Replies View Related

Hide Rows Based On Value In 1 Column

Dec 30, 2009

I wrote some simple code to work through a number of rows and hide the rows which contain a value of "XXX". For some reason, when the code hits the line denoted with? it hides the first row of "XXX"'s but then starts all over again at very first line of code outside the loop.

Sheet1. Range("start_1").Select 'cell c53

Do Until ActiveCell.Value = "EOF" 'cell c266
If ActiveCell.Value = "XXX" Then
Selection.EntireRow.Hidden = True '????
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Loop

View 2 Replies View Related

Code To Hide Columns Based On Value Of Another Column

Jul 31, 2014

with a simple code that could:

If column K2:k466 is blank or says "No" then columns L & M are hidden. If it says "Yes" it is not hidden.

Also,

If Column N2:N466 is blank or says "No" then Columns O,P,Q,R are hidden. If it says "Yes" they are not hidden.

Finally,

If Column V2:V466 has a zip code (or number) then columns T,U,W,X,Y,Z,AA,AB,AC are present. If there is no value in any of V2:V466 then they are hidden. .

View 12 Replies View Related

Hide Checkboxes Based On Column Values

Feb 28, 2014

My worksheet contains the following:

- Column G includes fifteen rows of a formula (beginning at G9) that returns a dynamic list of values based on criteria chosen through a dropdown box. The list can be anywhere from five to 20 values depending on the selection. When the potential matching values for the list are exhausted, the formula returns ""
- Column F includes one checkbox for each of the 20 rows containing the formula.

I need a script that will hide each checkbox that is next to a "blank" value. That is, if the cell in Column G = "", I need the corresponding checkbox to be invisible. Unfortunately, hiding the entire row is not an option. If the script could uncheck the boxes when hidden, that would be a bonus, but isn't absolutely necessary

View 4 Replies View Related

Hide Row Based On Color Column I Being Present

Nov 5, 2009

a way to hide used rows if the color of the cell in column I is green( color 35 vba) but only if the cell is visible will the macro change the rows visible state, in other words already hidden rows will remain hidden regardless if they match the color requirement.

below is some pseudo code to try to explain better what I'm trying to do. The below code doesn't actually work but I was wondering if someone knew some code that would actually do what I've described.

View 12 Replies View Related

How To Automatically Hide Rows Based On Value In Column Q

Jul 11, 2007

I am trying to implement the following:

After the user selects something using the validation list in cell F38, the macro should check in column Q in the rows 44 till 425 for "hide". For each row in which it finds "hide" the entire row should be hidden.

I have the code below but it does't work yet. It calculates for ages and afterwards only the first 2 rows of the 381 are hidden (probably because the third row is not "hide").

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyRange As Range
Dim ThisCell As Range
Target = Range("F38")

[code].....

View 9 Replies View Related

Automatically Hide Rows Based On A Value In Column Q

Jul 11, 2007

After the user selects something using the validation list in cell F38, the macro should check in column Q in the rows 44 till 425 for "hide". For each row in which it finds "hide" the entire row should be hidden.

I have the code below but it does't work yet. It calculates for ages and afterwards only the first 2 rows of the 381 are hidden (probably because the third row is not "hide").

Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyRange As Range
Dim ThisCell As Range
Target = Range("F38")

Set MyRange = Range("Q44:Q" & Range("Q425").End(xlUp).Row)
For Each ThisCell In MyRange
If ThisCell.Value = "hide" Then
ThisCell.EntireRow.Hidden = True
End If
Next ThisCell
End Sub

View 9 Replies View Related

Macro To Hide Rows Based On Column Value

Aug 15, 2006

I have read several related threads and tried to adapt their answers to my application with no success. I am trying to write a macro that will hide rows based on that row's value in a certain column. Specifically, column AB contains sums and if a sum equals 0 I want to hide that row. The sums start at AB5 and go to AB118 but there are 4 gaps in the column at rows 25, 47, 70, and 94.

View 9 Replies View Related

Conditionally Hide Rows Based On 1 Column

Nov 22, 2007

I am trying to hide rows based on the contents of column BS. It the cell is empty (not just zero value, but completely empty of all formulae), then I want to leave it unhidden, then if the cell value is less than the value in cell E2 I want to hide the row. This code doesnt seem to like the first if...then next i

Sub hiderows()
Dim i As Long
Set v = cell.Value("$E$2")
' Turn off screen refresh for speed
Application. ScreenUpdating = False
' Get last row Col BS
For i = Range("BS2000").End(xlUp).Row To 15 Step -1
If IsEmpty(Cells(i)) Then Next i
ElseIf Cells.Value(i) < v Then Rows(i).Hidden = True
End If
Next i
' Turn on screen refresh
Application.ScreenUpdating = True
End Sub

View 4 Replies View Related

Hide Blank Rows Based On Value In Column

Jan 13, 2008

What I have is a sheet where the cells in range A9:A3508 have a formula that evaluates to blank if any of a variety of conditions are not met (date falls outside desired range, does not meet filter criteria, etc.) and a number if these conditions are met. What I am looking for is for all rows in that range where A is blank to be hidden (not deleted), and for this to automatically update every time A changes (meaning that if A goes from blank to a number, that I will need that row to become unhidden again). I have considered just recording the macro and calling the function with a button, but as this is for external users, some of whom may be unfamiliar with Excel, I would rather keep it as clean, simple, and automatic as possible.

View 5 Replies View Related

Hide Based On Time Difference Column

Mar 2, 2008

Have 2 columns with time values and the third showing the time difference ( no Problems). what to hide the row if the time diff is > 2 seconds? (problem) What would be the best why to do this

{Sub TimeDiff()
Dim i As Integer
Dim timevalue As Date
timevalue = "00:00.20"
Application. ScreenUpdating = False
With ActiveWorkbook. Sheets("Racing")
For i = 4 To . Range("M1") - 1
If .Range("P" & i) > timevalue And Rows(i).EntireRow.Hidden = False And .Range("P" & i) <> "" Then
Rows(i).EntireRow.Hidden = True
End If
Next i
End With
Application.ScreenUpdating = True
End Sub

View 2 Replies View Related

Auto Hide Column Based On Formula Result

Aug 5, 2008

I have an Excel workbook with multiple sheets. In one sheet, there are many columns that automatically get hidden based on cells values (=1) in another sheet as I type. I use this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$7" And Target.Value = 1 Then
Sheets("Stakes").Range("E:E").EntireColumn.Hidden = True
Else
If Target.Address = "$C$7" And Target.Value <> 1 Then
Sheets("Stakes").Range("E:E").EntireColumn.Hidden = False
End If
End If
End Sub

Recently I had to change the second sheet that instead of manually entered values, formula results appear in cells. And the above code doesn't work anymore, columns are always stay unhidden. How can I achieve what I want? I need columns get hidden if formula results =1.

View 4 Replies View Related

Hide Show Pivot Column Items Based On Date

Nov 8, 2006

I have a pivot table with the column fields as dates. I will like to be able to use VB to dictate which value to show. Here is brief code in which I just recorded...

Sub Button1_Click()
Range("B7").Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Date")
.PivotItems("10/30/2006").Visible = False
.PivotItems("10/31/2006").Visible = True
End With
End Sub

I would like to show current day only using =today() or something similar. THis would eliminate the user having to modify the pivot tables daily.

View 5 Replies View Related

Command Button To Hide Rows Based On Date Range In Column A

Aug 22, 2014

In one spreadsheet, I want to have a command button that will hide all rows where the date column (column A) shows a date older than one week from today. When this button is clicked again, all rows will unhide again. Preferably the Command button title would change to reflect whether it is on the hide or show cycle (for example "Click to Hide all older than one week" and then "Click to Show all events") .

View 9 Replies View Related







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