Hide Rows Based On Text Search In Three Columns?

Mar 22, 2013

I am working on a time management sheet for my company. I need to be able to click a button and have the file search 3 columns for a persons initials and then hide all the rows where the initials are not in at least one of the three columns. I seem to have no problem getting it to work for one column at a time, but as soon as I try to search more than one it all falls apart.

I will also need to create an unhide all button to reset the sheet after the macro has been run.

I have attached a sample of the sheet below. Each project needs to have 3 rows to show the schedule and budget broken down by each team member.

Project Number
Address
Service
PM
SS

[Code]....

View 5 Replies


ADVERTISEMENT

Hide Rows Based On Multiple Columns Formula Returning Empty Text ""

May 13, 2008

I would like to rows based on multiple column conditions criteria. ie., if the columns N, O, P values are "", then hide the particular row. The logic given in the website here, i tried But, it is not 100% working. It works for a few rows at the start of the database & it works for the rows at the end of the database. In between, for a few rows, even if the column values are "" it does not hide those rows.

View 2 Replies View Related

How To Hide Rows Based On The Value Of Two Columns

Apr 11, 2009

I need to filter out rows, based on a specific value in column A, (documents on file for the clients), then check column C (last name) and D (client first name), which can have the same client listed multiple times, based on how many different documents are on file ......

View 12 Replies View Related

Hide Rows Based Over Multiple Columns

Jan 29, 2013

a code that will search each cell across 4 columns and hide the row only if all cells are blank. The macro should search columns "b", "c", "e", and "f" to display all rows where at least one of the cells has a value.

Ex.

Col.B Col.C Col.D Col.E Col.F
1. 123 xxxxx 150
2. 56 xxxxx 50
3. (blank) (blank) xxxxx (blank) (blank)

In this ex. row 3 would be hidden.

View 1 Replies View Related

Hide A Rows/columns Based On A Cells Contents

Jun 30, 2006

way to automatically hide a row or column based on a specified cell.

Or even something general like: Hide all rows with cells evaluating to #n/a.

View 9 Replies View Related

Hide / Unhide Rows And Columns Based On Several Date Ranges

Mar 19, 2014

I am building a sheet to display deadlines (rows) by project (columns). I would like to have it automatically hide the rows and columns based on the date of the deadline. If the deadline is today or 1 week from today the associated rows and columns should be visible, otherwise, I would like to hide them.

My table is A1:N9, with A1 being a blank, row names A2:A9, and column names B1:N1.

View 4 Replies View Related

Automatically Hide/Unhide Columns Based On Cell Text

Jan 10, 2009

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 13 Then Exit Sub
If InStr(Target.Value, "Other (specify in next column)") Then
Columns("N").Hidden = False
ElseIf WorksheetFunction. CountIf(Columns("M"), "Other (specify in next column)") = 0 Then
Columns("N").Hidden = True
End If
End Sub

but I have a lot of columns that I need to perform as above and I have put the code together as below

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next

If Target.Column = 13 And InStr(Target.Value, "Other (specify in next column)") Then
Columns("N").Hidden = False
ElseIf WorksheetFunction.CountIf(Columns("M"), "Other (specify in next column)") = 0 Then.................

Using the above code, when I selected more than one cell anywhere in my workbook and pressed delete I was bugging out with a runtime error 13 message. You can see from the above code that I inserted "On Error Resume Next" - this got rid of the runtime error 13 message, but now when I select more than one cell and press delete, hidden columns are incorrectly revealed in my worksheet. how I can extend the working code at the top of this posting so that it works for a number of different columns in my Worksheet i.e. without the runtime error 13 occurring and without columns being incorrectly revealed.

View 8 Replies View Related

Hide Rows With Variable Text Based On Dropdown Selection

Jun 11, 2014

I have a spreadsheet which contains our fleet information covering many vehicles in one list. The teams for these vehicles are listed in Column A. What I would like to have is:

A dropdown box to pick from All, or the various teams in A1To hide every row that doesn't match the selection of A1To reveal every row that contains the selection for A1 at any point in column A. e.g: "*Dog Team*"

This is because something might be listed as "Moved from Dog Team" or "Dog Team, temporarily on loan", or "Dog Team V66.m"

I have taken a small sample of the data I will be working from and made a very simple drop down box which displays the pages of information for the vehicles by hiding/unhiding blocks of columns:

Code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$2" Then
If Range("A2") = "MOT/Service" Then
ActiveSheet.Columns("A:P").EntireColumn.Hidden = False
ActiveSheet.Columns("Q:CE").EntireColumn.Hidden = True
ElseIf Range("A2") = "Contact Details" Then

[Code]....

But because there is also filters on the sheet, meaning the positions of the entries based on rows can change, I need it to search for the "*xyzzy*" method, but am unsure how to do this! While just using the Filters will work, due to some human limitations I have been asked to have a specific drop down box in a very specific location with instructions next to it.

View 1 Replies View Related

Excel Text Search Through Different Types Of Text And Action Based On Text

Oct 14, 2008

1. Search an excel sheet "column" for a particular type of text and insert values based on that text (if found) in another column.

e.g I have column A1 to A10 with different types of text. I would like to search for the keyword "Risk is high" OR "Risk=High" for each cell in the column and insert a "1" if found beside it's corresponding "B" column. If not found, I would like to insert a "0".

So, if the text "Risk is high" OR "Risk=High" was only found in A6, I would like B6 to be "1". Rest of the values in the B column would be "0's", since the text was not found in any of the other cells.

View 10 Replies View Related

Hide Rows With 0 In X Columns

Jul 19, 2007

I have a workbook comprising several worksheets and on each of those worksheets I want to hide the rows where there is a zero in each of three specific columns on any row. If there is an entry that is more than zero in any one or more of those columns then the row should not be hidden.

In the attached example I would want to hide rows 4, 8, 12, 18 and 19 as there was a zero in each of the columns C, E and F. I would not want to hide the other rows as they have a figure that does not equal zero in at least one of the columns C, E or F in the row.

a macro for making it work on just one sheet - I can write the code to make it work for each of the worksheets in the book.

View 3 Replies View Related

Hide Blank Rows Based On Values In Other Rows

Nov 3, 2006

I have a worksheet used for inventory. In Column A is the quantity (to be entered manually). In Column B is the product description. In Column C is the price of the product, and Column D the total price (column C price x the quantity entered in Column A). At the bottom of the worksheet is a grand total. Also, Column B (products) is grouped into subheadings by the supplier each product came from (for example, row 6 has the title PPG, and then rows 7-137 list every product from PPG).

The calculations in this worksheet work fine. What I am trying to do is, using a macro once all of the appropriate quantities are entered in column A, automatically hide every row of product that does not have a quantity. The tricky part is, if no products under a given supplier subheader are entered, the subheader also hides, and if a quantity is entered, that subheader shows. For example, if I have no quantities under any products for PPG, then the PPG subheader hides, but if just one quantity is added, PPG shows. Also, this list will be constantly updated, new products will be put in and taken out all of the time, so I cannot base the macro on a specific number of rows.

View 2 Replies View Related

Hide Columns And Rows If Total Is Zero?

Dec 15, 2011

I have a worksheet with a large amount of data, but a lot of cells are zero (because the content of the cells is calculated). I would want to be able to build a macro which can hide all the columns whose total is zero, and also all the rows whose total is zero. The amount of columns and rows will be variable, because i expect to keep adding information continuously. The row with the totals to evaluate is 4, and the column with the totals to evaluate is H. (I cannot make a filter for this one, because there's already one some rows upwards).

View 3 Replies View Related

Hide All Unused Rows And Columns

Jun 28, 2007

Is there a simple way to hide rows and columns? A lady in my office just asked me how to make only Columns A to J visible and only show 100 rows. She doesn't want the rest of the spreadsheet to show. I know how to manually hide columns and rows but it takes a while to drag down and select 64000 rows so I thoguht I would ask the question:

Does Excel have a feature that will automatically hide all unused rows and columns or is there a simple VBA code to do this?

View 9 Replies View Related

Macro To Hide Rows And Columns

Aug 1, 2008

The macro code that will populate and input box and ask you which range of columns and range of rows you wish to hide, hide the columns and advise you via a message box that it has been completed

View 9 Replies View Related

Hide Cells, Not Rows/Columns

Dec 5, 2009

Is it possible to hide just a portion of a column? I want to hide just E85:E98, for example. Not all of column E.

View 9 Replies View Related

Hide Combo Box With Rows Or Columns

Dec 8, 2006

I have created a macro which hides columns I:O on a worksheet. Within this area I have added a combo box - but when I hide columns I:O (via the Macro) the combo box remains visible. Is there a way of ensuring the combo box is hidden along with the selected columns?

View 2 Replies View Related

Hide Columns / Rows While Having Worksheet Protected?

Jun 19, 2014

I got a worksheet here. I'd like to lock all the cell height and width using protected sheets function. I realized from time to time I have the need to hide them. How do I enable hiding sheets while maintaining cell integrity?

View 3 Replies View Related

Combining Hide Columns With Autofilter Rows

Dec 21, 2008

I have a spreadsheet in Excel 7 for a lifelong cashflow model. The main worksheet is called 'Projection' with ages in rows & income (from a variety of sources) and expenditure (of various kinds) in columns fed with data from the Input sheet.

On the 'Input' sheet I have a button called Format Graphs which controls the following macro:

View 6 Replies View Related

Hide Rows In VBA Macro By Checking 2 Columns

Oct 8, 2009

I've tried using multiple loops in the forum but cannot seem to figure out how to actually get them to work properly using the conditional VBA codes on two separate worksheets. The first code snippet is checking cell values from row 6 to 148 as such:

Sub Check_Shifts()
'Insure all shift entries are completed
If Range("K6").Value < "1" And Range("I6").Value < "1" And Range("G6").Value < "1" Then
Range("G6").Value = Range("F6").Value
Range("I6").Value = Range("F6").Value
Range("K6").Value = Range("F6").Value
ElseIf Range("K6").Value < "1" And Range("I6").Value < "1" Then
Range("I6").Value = Range("G6").Value
Range("K6").Value = Range("G6").Value
ElseIf Range("K6").Value < "1" Then
Range("K6").Value = Range("I6").Value
End If
If Range("K7").Value < "1" And Range("I7").Value < "1" And Range("G7").Value < "1" Then........................

View 7 Replies View Related

Hide Blank Rows Which Spans Two Columns

Sep 15, 2007

Hide Multiple rows. I have text within two columns A, D. How can I Hide Blank rows which spans two column Named Ranges, "Range1" (A1:A15) "Range2" (D1:D15). As an example:

Beginning with this:

...A......D

1.Text
2........Text
3.
4.
5.
6.Text
7.Text
8.
9.
10.......Text
11.Text
12.
13.......Text
14.
15.......Text

To this , after hiding blanks:
...A......D

1.Text
2........Text
6.Text
7.Text
10.......Text
11.Text
13.......Text
15.......Text

View 2 Replies View Related

Search Columns And Paste Rows

Feb 26, 2009

I have an excel spreadsheet with:
2 sheets,Sheet1 and Sheet2
4 columns (A,B,C,D)
100,000s of rows.

I need to search 3 columns, B,C and D, for particular values.
Column B needs to be = 0
Columns C and D need to be "<=0.1"

When all three criteria in the row are matched I need the value from column A in that row to be pasted to Sheet2 and then for the macro to continue searching the rows.

I have attached an extract of the data as the files size is too large to upload.

View 10 Replies View Related

Search Cell For Text String And Paste Text In Based On Finding?

Jun 29, 2014

I need to create a macro to do the following:

Search the activecell for a text string (a), and then either paste in text string (b) at the end of the cell if (a) is found, or text string (c) if (a) is not found.

For example, if the activecell has "AA/" in it, I want the cell to become "AA/01" (pasting in "01" at the end), and if the cell has just "AA" in it, I want it to still become "AA/01" (pasting "/01" at the end). The macro will be linked to a commandbutton.

View 7 Replies View Related

VBA To Hide Columns Based On Formula

Sep 28, 2011

On my 'Report' worksheet in cells I1 to Z1 the formula returns "" if there's no data in that month or "1" to "18" depending on which month it is. e.g. if it's a 12 month accounting period then 6 of the columns will have no data in them and will have "" in row 1, the other columns will return 1 - 12 in row 1; if it's a 15 month accounting period then 3 of the columns will have no data in them and "" in row 1 and the other columns will return 1 - 15.

The VBA code below is part of a longer macro on my 'Data' worksheet. The rest of the code works fine and I just wanted to add this bit to hide the blank columns on the 'Report' page.

[VBA]
Private Sub Worksheet_Change(ByVal Target As Range)

Application.Calculate
With Sheets("Report")
Dim i As Integer
If Intersect(Target, Range("I1:Z1")) Is Nothing Then
Else
For i = 9 To 26

[Code] ........

View 4 Replies View Related

Hide Columns Based On Cells Value?

Feb 24, 2012

macro below that will only hide columns if all the rows (e.g. row 8 to 18) have no value?

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("U18:AB18")) Is Nothing Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub

[Code].....

View 8 Replies View Related

Hide Columns Based On Selection

Aug 30, 2008

I have a worksheet that lists the months of the year on row 3 from columns C through N.
What I am trying to do is to be able to select the month I want from a drop down list or combobox and then hide the remaining columns based on the selection. For example if JAN is selected the months FEB through to DEC would be hidden.

View 9 Replies View Related

Resize Visible Rows Based Only On Visible Columns Text

Apr 22, 2009

Need to correct code to resize all visible rows on a sheet based only on the text in the visible columns. I have tried the below code but when it resizes it is using the largest amount of text in the rows including that in the hidden columns.

View 3 Replies View Related

Compare And Search Columns For Text?

Apr 14, 2009

I recently posted a similar thread which was very well supported but I couldn’t get a solution because my requirements were not clear enough. I would like to try again with a slightly easier and clearer requirement.

I would like a spreadsheet that compares and searches columns for text and returns true if a duplicate is found.

It is similar to a lottery checker except the lines being checked could be a string instead of a single character.

I have attached a spreadsheet which helps explain what I’m trying to achieve.

Basically, a user can sequentially enter a single character to cells F1:F5. These values are then compared to columns A:C. If one of the columns contain the values in column F then return true to G1.

View 2 Replies View Related

Automatically Hide Columns Based On Dates?

Aug 4, 2013

I am trying to automatically hide columns based on dates. I have a set of dates ranging from the beginning of August this year until the end of December 2019. I am trying to hide all columns that are at least a day ahead of the current date. Today on 8/4/13 it would show all columns up until today along with tomorrow 8/5/13.

8/1/2013
8/2/2013
8/3/2013
8/4/2013
8/5/2013

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 Columns Based On A User Entry

Mar 28, 2009

Is there a way of a user can add a number in a cell and this would hide a different amount of columns.

OR :

Ideally I would prefer a drop down with dates and the user could select a forward date and all the columns with dates up to that would appear. This would mean they could look as far our as required and all unwanted data would be hidden.

View 4 Replies View Related







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