Excel - Hide Rows Depending On Values
Sep 12, 2013
I have created an excel document with If formulas. If nothing gets entered in that particular row, the row simply says "None". Is there a way to get rid of any row that contains that value by any chance?
Something along the lines of if the row says "None" then that particular row gets automatically hidden? It would probably need to be in VBA?
View 9 Replies
ADVERTISEMENT
Feb 7, 2007
I’ve done a search of the forum for a macro and found some post that seems to be about what I want to do, but unfortunately my minimal vb experience prevents me from adapting them to my requirements.
I‘ve got a workbook with three sheets; say Sheet A, Sheet B and Sheet C. I want the info in Sheet C copied to either Sheet A or B depending on the info in cells in Column A of Sheet C.
Sheet C contains customer info, there are about 9 column headings and up to 30 000 rows (Individual customers).
The cells in Column A will contain a number between 0 - 23. What I want the macro to do is, if a cell in Column A contains any of these numbers, 0, 1, 2, 6,7,8,9,10,17,19,20,21,22,23, I want that whole row copied to Sheet A and if it contains 3,4,5,11,12,13,14,15,16,18, I want it copied to Sheet B. The cells will only contain one number, never a combination.
View 3 Replies
View Related
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
Jul 6, 2014
I have lot of data in Excel 2010 which I wish to bring in Columns using a Macro depending on the input value which the macro should prompt me. For E.g.:
A1B1C1D1E1F1G1H1I1J1
12345678910
12345678910
12345678910
12345678910
12345678910
If I select data from A1 and J1 (in practical it will be more Columns) the Macro should prompt me how many Columns would be the output on Master Sheet. If the input is 2 then it should create an output Sheet "Master" and should show the following result
A1B1
12
12
12
12
12
34
34
34
34
34
56
56
56
56
56
.. ..
.. ..
It after selection I run the macro and input 3 then the output should go in three columns (A1,B1,C1) one below other. If 4 is Input then 4 Columns (A1,B1,C1,D1) will come below each other so on and so forth.
View 6 Replies
View Related
Apr 13, 2014
i have a macro which takes the results generated and puts them into a table and filters the data so that zeros does not show and arranges the table from largest to smallest. Now i have a problem where i need to select the power, fuel oil consumption, weight and area from one table and the other power, fuel oil consumption, weight and area from the other table and combine them together so that i can have all possible combinations of the data, but i don't want the zeros to show in the combinations. i need the combined data to show on a separate sheet. The data of table 1 varies with rows as shown:
The Data of Table 2 varies with rows as shown:
I would like to achieve a result like this in the following columns and rows without having to input them manually:
View 1 Replies
View Related
Jun 19, 2007
Need a macro which will hide rows having 0 values. On running once it will hide those rows having 0 values and on pressing second time it will unhide those hidden rows and so on.
View 14 Replies
View Related
Dec 12, 2006
I wanted to see if there was a way to hide rows that do not have a pre determined amount of values in a row (one after another). Attached is a simple spread sheet to hopefully illustrate what I need.
I'd like to be able to only show rows where 2 consecutive 0's exsist. Then 3 consecutive 0's. Ultimately I'd like to show anywhere from 2-12 consecutive 0's and have that selection available via the combo box.
View 5 Replies
View Related
Nov 16, 2011
I have a vba to hide certain rows based on 4 values (either 15, 20, 25, 30) are the choices in the 'ComboBox' drop down list. I also have the rows grouped so i need to make sure to collapse those back each time. Here is the vba i'm using, but its not quite right for some reason.
PHP Code:
Private Sub ComboBox1_Change()       Â
If Range("J8").Value = "15" Then           Â
Range("A185:A244").EntireRow.Hidden = True           Â
Range("A245:A304").EntireRow.Hidden = True           Â
Range("A305:A364").EntireRow.Hidden = True           Â
Range("A365").EntireRow.Hidden = False           Â
[Code]...
View 1 Replies
View Related
May 17, 2007
Just looking at the first or second Column, need to Hide all ROWS which either contain "#VALUE!" or "N/A".... The sheet data changes for any age the user input...
View 9 Replies
View Related
Feb 1, 2009
Is there any way to hide a row if columns 6 and 7 both show either a "-" or a number lower than 0.5? Cells in both rows contain a VLOOKUP formula.
View 9 Replies
View Related
Sep 13, 2006
I’ve got a spreadsheet with approximately 30,000 rows and I would like to create a macro which hides every row which has not the value 12, 14 or 19 in column I. What is the best way to do it? With an if statement?
View 4 Replies
View Related
Sep 8, 2007
I need to hide rows on a worksheet based on entries from DATA VALIDATION dropdown lists on another. Due to the fact that all the entries are on a different page, and there is no active cells or entries made on the "second" worksheet, the WORKSHEET_CHANGE events will NOT work. Trust me, I have spent two days searching the net for a possible answer and trying every trick I could find. Not to seem redundant or a pain, but right from the git-go, FORGET the WORKSHEET_CHANGE event as an option. I need a way to fire the macros from a formula change in a linked cell, and it won't be an active cell, nor will there be any kind of entry made on that page at all. ALl the entries (choices) will be made on another sheet, but the result needs to be hiding the rows not required based on the choices I make. There are over 300 lines and when I am done there will be only approximately 35-40 left. Right now the people using this are actually making copies of the workbook, and then deleting the worksheets they don't need (I am hiding those with an array) and then deleting the lines they don't need on the worksheet remaining. (Stupid and slow I know, but I didn't develop this workbook, I'm just trying to bring it out of the stone age) Here is some sample code with what I want to do, except it is of a WORKSHEET_CHANGE nature and will not work.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("INPUT!M6"), Target) Is Nothing Then
Rows("11:50").Hidden = True
If LCase(Range("INPUT!M6").Value) = "100" Then Rows("31:50").Hidden = True
If LCase(Range("INPUT!M6").Value) = "100" Then Rows("11:30").Hidden = False
If LCase(Range("INPUT!M6").Value) = "225" Then Rows("11:30").Hidden = True
If LCase(Range("INPUT!M6").Value) = "225" Then Rows("31:50").Hidden = False
If LCase(Range("INPUT!M6").Value) = "0" Then Rows("11:50").Hidden = False
End If
End Sub
View 9 Replies
View Related
Aug 13, 2014
I've been trying to put together some code to hide a range of rows on one page based on cell values on a different page. So basically Sheet1 cell A1 value is 10, A2 value is 20. When macro is run via button rows on Sheet2 from 10-20 would be hidden. The issue is the values in the cells on Sheet1 will vary. I thought something like the following would work but it doesn't.
[Code] ....
View 6 Replies
View Related
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
May 17, 2013
I have two sheets in a file called MyFile.Sheet1 has a full table of data in named range "myNamedRange" - an array that spans Sheet 1 from A2:K322.Sheet2 has a list of data in Column A (Range A2:A85) that I need to find in Sheet1 - either directly by the column the data is most likely to be found in [in this case, Column C ( specifically Range C2:C22)] -OR- via the named range array.
GOAL: Use the list of values in Sheet2 to hide all rows on Sheet1 that match.
View 2 Replies
View Related
Apr 8, 2014
I am trying to hide rows based on values in a cell in that row. I have formulas in column xea that yields a 0 or 1 and I want to hide all rows with 0.
The code below works but I have to run the macro. I want it to happen automatically when the cell values change and I have not been able to figure it out.
Sub HideRows()
Application.ScreenUpdating = False
Application.Calculation = xlManual
For Each c In Range("xea1:xea350")
[Code] ........
View 9 Replies
View Related
Sep 21, 2013
I am trying to hide unhide excel rows based on the answer in "A1". Row 2 to 10 shall be unhide if answer is "Yes" and it shall be hidden if answer is no.....
[Code] ......
View 1 Replies
View Related
Jan 28, 2012
In sheet 1, I have a list of data in A2:D21. In sheet 2, I have formulas in the same range that "paste link" the data. If, there is no data entered in any entire row of the same range in sheet 1, then I want the entire row to hide automatically in sheet 2. In fact, unless there is something entered to start with, I do not want any of the rows to be visible. Is this possible and how?
View 2 Replies
View Related
Jan 28, 2013
How can i hide and unhide column and rows using checkbox in the excel.
detail price qty amount
chair 1000 1 1000
some time i just want to see only the amount or some time i want to see the qty, how can i hide and unhide row or Column
View 1 Replies
View Related
Nov 14, 2013
I am trying to make an excel toggle button and am stumped. I am trying to create a toggle button that hides the entire row if it finds a 0 in a preset range that I am calling "Alpha". I have tried this code but it's not working.
Code:
Private Sub ToggleButton1_Click()
If ToggleButton1.Value = True Then
For Each cell In Range("Alpha")
[Code].....
View 3 Replies
View Related
Jul 24, 2014
I have a seating plan for my students that has all sorts of data in it and I want to hide certain rows from students. However, they are not all in a group, they are spread out. So for example I have row 3 with student name, row 4 with their target grade, row 5 with their current grade, then row 6 is another student with data on 7 and 8. After that I might have a gap and then the next student on row 10 with data on 11 and 12. I want to toggle on and off the data and leave the student seats. I'm thinking that Subtotals would be the best way, but not sure how to implement it. Do I put row headings on the side? Also I haven't used subtotals since Excel 2003.
View 1 Replies
View Related
Nov 29, 2011
Excel 2010 how to not chart zero values in a Pivot Chart?
View 1 Replies
View Related
Mar 24, 2014
I would like to run a macro that searches column [AS] and hides any rows in that column that contain "0".
View 6 Replies
View Related
May 23, 2012
I would like to hide rows for data that does not meet specific criteria. For example: If a user selects room number 101 from a drop down in B1, I want to filter data in range A3:F1000 to show me only room 101 rows (A column) where C column contains a value larger than zero OR D column contains a value larger than zero OR E column contains a value larger than zero. I do not want it to return rows where 101 may be in other columns beside A.
Sample:
A B C D E F
__________________________________
1 ROOM: 101
2
3
4 101 XX 1.2 0 0 P
16 101 YA 0 0 1.1 L
23 101 JJ 3.2 2.1 0 L
55 101 JJ 0 0 1 P
So, if a row contains 101 in column A and all three values in columns C, D, and E equal 0, then those rows will be hidden.
View 8 Replies
View Related
Apr 16, 2014
I am trying to create an inventory list that automatically updates the supply quantity when items are taken away from inventory. I have created entry cells where the quantity of items taken out of inventory can be entered (example, cell F2 of the attachment), and the new overall inventory count is adjusted accordingly for each stock of items (example, cell B3). These automated adjustments are repeated for each subsequent row for every time items have been taken from inventory and recorded.
I managed to get it to do what I originally intended with exception of the fact that it still present values on rows where there were no activity - or quantity of items taken from out of inventory (row #6 and beyond of the attachment). Is there a way of "hiding" these values without removing the formula, or possibly set conditional formatting where no values are displayed if no changes in inventory has been entered?
Example.xlsx
Using Excel 2010
View 4 Replies
View Related
Mar 18, 2014
I currently have the following Macro for one of my many checkboxes in 2007 Excel:
[Code] .....
It works perfectly until additional rows are added/deleted before the indicated rows in the code (It changes the number sequence in the workbook). The number sequence stays the same in the code which means I am now hiding rows either before (delete rows) or after (insert rows) the intended rows I want to be hidden. Is there a way to change the above code to remain with the assigned rows regardless of the adding/deleting of rows before it?
View 1 Replies
View Related
Oct 30, 2011
Operating System: Windows XP, Excel version: 2003
Aim: To create a Macro to hide all rows where the date in column D is before today. Column D has about 600 rows.
Current solution:
Code:
Sub Hide_Old2()
'Worksheet name
With Worksheets("Schedule")
'set start of date range
Set rngStart = .Range("D2")
'find end of date range
[Code] .....
The problem with this solution is its speed, or lack thereof. It causes the screen to hang and flicker while it cylces through. Is there some way to create a range based on the date and hide the range? or another solution?
Note: Autofilter is not an option, as the spreadsheet with the dates needs to be kept simple for other stakholders and the macro is being run from another sheet.
View 3 Replies
View Related
Feb 27, 2012
(Excel 2010): Hide row if cell C in this row is empty.
I've just started using macros and I'm sure there is one for this problem.
View 5 Replies
View Related
Dec 22, 2008
is there a way to auto hide a row depending on the data in two cells. Basically if two specific cells are empty or return a zero or specific number i want the row to auto hide.
View 5 Replies
View Related
May 30, 2014
I made a triangle with the excel forms and I want that it's shown when the value in A1=1 and hidden if value in A1 is NOT 1.
Alternatively: Make the line colour white or something like that. I just don't want to see it anymore
Is that possible without VBA? Or if not, how would I do that?
View 1 Replies
View Related