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
ADVERTISEMENT
Dec 1, 2009
I have filtered a worksheet and want to only total the data in the columns that are visable, is this possible?
View 4 Replies
View Related
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
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
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
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
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
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
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
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
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
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
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
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
View Related
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
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
Oct 1, 2008
i have created a spreadsheet to simplify our work flow, I am stuck on what is probably the easiest of the commands.
basically have rows dedicated to specific codes and the colums represent values relating to each code, all codes have a different set of values, the attached example only has a few variables but the actual worksheet will have several hundred.
the idea is the user will input the code they wish to get details on in A2 and then press the command button and it will then show (as per the after sheet in the attachment) just the relevant information for that code, so filter the code in column A and hide the columns which hold no value.
where i am getting stuck is I am not sure the best way to proceed, is it best to create the macro button to do the filter and hide or is there a better way using vlookup and a pop up window asking for the relevantcode to be inputted to to retrive the information, again understand there will be hundreds of colums and hundreds of rows and the values may be 20 or 30 colums apart for some of the Codes so this simplification is really saving the user a lot of time.
View 7 Replies
View Related
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
Nov 22, 2006
I am filtering the data displayed in a chart by hiding columns. I would also like to filter the X-Axis labels by hiding columns. If I do this manually I have no problems but when I run the following macro the chart gives a reference error for the X-axis labels.
Sub ShowA2()
Application. ScreenUpdating = False
num = Sheets.Count
Sheets("X-Axis").Activate
Range(Columns(1), Columns(256)).Select
Selection.EntireColumn.Hidden = False
For a = 1 To 5
Sheets(num - a).Activate
If ActiveSheet.Name = "A2 Data" Then
Columns("A:Q").Select
Range("A10").Activate
Selection.EntireColumn.Hidden = False
Sheets("X-Axis").Activate
Columns("A:E").Select......................
View 3 Replies
View Related
May 26, 2014
I have a macro in which i can enter the rows i want to hide.
If i want to hide "position 32" i have to enter the number 8 of the row. This works fine. But now if i want to hide the "position 32" from Sheet1 it also should hide the rows 4-8 from Sheet2 [Data with 32].
Or if i hide "position 34" in Sheet1 [row 10] it also should hide the rows 14-18 in Sheet2.
View 14 Replies
View Related
Jun 9, 2013
Sub Button294_Click()
If Sheet1.Range("A34:A94") = "HIDE" Then
For Each cell In Range("A27:A94")
If UCase(cell.Value) = "HIDE" Then
cell.EntireRow.Hidden = True
End If
End Sub
View 4 Replies
View Related
May 19, 2013
I have a pivot table the has a listing of potential customers and I have included meeting dates in this table. The problem that I have is that the Grand total adds up all the dates and I have a total that doesn't make sense.
I want to hide the total for the 'Date Meeting Setup' column and keep it for the others. Can this be done??
View 2 Replies
View Related
Aug 29, 2006
I want to zero out or blank out my running balance in the columns where I do not have an amount entered. So instead of having my running balance total run all the way down the spreadsheet, I want it to be blank at the first cell where I have not entered in a new bill. I have attached an example of what I am trying to do.
View 2 Replies
View Related
Mar 26, 2014
I have medium size sets of data. They have different properties including alpha, integer, date, etc..
I would like to set up a macro to search through the data dump based on criteria asked of me specific to a row and return a random list of entire rows that is approximately 10% of total rows where the criteria matches up with what I have specified.
Site
Building
Room
Tag
100-Emerson Court
A
A101
SS102058
[code].....
So if I choose the site to be "100-Emerson_Court" and there are 400 rows with "100-Emerson_Court" in column A, in a separate sheet called "audit", it will transpose a random 10% or 40 of the rows.
View 14 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
Oct 14, 2004
I have a stacked column graph showing data for 5 categories for 4 years (4 columns, 5 categories each).
I would like to display a Total above each column. I was able to do this on a single chart by just adding a text box and manually adding the total amounts. However, I would like this to be updated dynamically, as the data will be changed frequently.
Is it possible to:
(a) Have the total display as a data lable, or
(b) Have a text box containing a cell reference
View 9 Replies
View Related
Jul 24, 2007
I need code that will check each column from D:P in the " Total" row for a value of Zero. If it finds a zero then delete entire column. This will be the final procedure of a macro that does other formatting things so the number of rows will differ causing the "Total" row to be dynamic. I have the following code that will find the word total, but I don't know how to set the range to offset 1 col each time checking for zero and deleting if true. The word "Total" is merged between columns A:B. see example sheet.
Sub asdf()
Dim c As Variant
Dim Rng As Range
'search the sheet for "Total"
Set c = Cells.Find("Total", lookat:=xlWhole)
'if it is found
If Not c Is Nothing Then
Set Rng = Range(c, c.Offset(0, 3))
View 5 Replies
View Related
Jul 10, 2007
I am attempting to create a chart from data generated outside of Excel 2003 SP2, that has been Copied and Pasted into Excel. There is no metadata associated with this data. I have created a list with the data once it has been pasted into Excel 2003 SP2.
The Workbook has five (5) worksheets, all with the default names (Sheet1, Sheet2, etc.). I paste the data into Sheet1 and reference this from the other worksheets. Sheet2 shows the charts for all the data. Sheet3, Sheet4, and Sheet5 are each for different regions, North, South and West respectively. I would like to enter the formula into Cell: Sheet5!M5 so it auto populates with the appropriate and correct information. Sheet1 information is as follows;
Column B has a header of "CreateDate" and is in the format of; 4-Jun-07
Column O has a header of "Business Unit" and has three (3) possible answers, North, South or West. **I have attached a screen shot of the two colums used named, "Columns.Used.png". I have hidden the columns in between as they contain confidential information.**
I would like a formula that gives a total of one if both criteria are met. The criteria is as follows;
IF Column B on Sheet1 equals Cell L5 on Sheet5 AND Column O on Sheet1 equals West THEN the total should appear. **I have created and attached a sample spreadsheet "Sample.Data.zip"that contains only basic data on Sheet1 and Sheet5 as those are the only sheets relevant.**
View 9 Replies
View Related
Dec 30, 2008
I have two columns, one with part numbers, the other with quantities. My system breaks the inventory down into locations, which doesn't allow me to see the total number of parts allocated without adding up the individual locations. I was wondering if there was an excel formula or macro that could do this for me.
For example, my data looks like this:
Part Number QTY
AAA 2
AAA 5
BBB 1
CCC 6
CCC 4
CCC 2
As you can see, if I want to find out the total number of part AAA that is allocated in the system, I need to add the first two rows, to get a total of 7. Now, imagine a spreadsheet with roughly 3,000 rows, and you can see why I would like an automated process for this.
View 6 Replies
View Related
Feb 9, 2014
I have data in column B with blank rows between data.
I want to sum the rows column O that the first line column B has data to the next row in column B that is blank before the next row that has data, the result in column R.
B10 has data
next row that has data is B16
Sum the data in O10 to O15 and put in R10
B16 has data
next row that has data is B19
Sum the data in O16 to O18 and put in R16
So on and so on
View 9 Replies
View Related