I have done a search and drew a blank on this one. Hopefully there is an easy answer otherwise I see this as a fundamental flaw in Excel 2007 (on top of the lost productivity from ribbon interface). In all previous versions on Excel it was possible to select the rows either side of a hidden range (i.e. including the hidden rows) and right-click, Unhide. In Excel 2007 only visible cells are selected so this method does not work.
Hovering the mouse pointer on the row headings at the point of the hidden rows, waiting for the cursor to change and then right-click, Unhide only unhides the row imediately above, NOT the entire range. It seems the only way to unhide the entire range is to enter an address in the Name Box (taking care only hidden cells included otherwise only the visible ones will actually be selected) and then Format > Row > Unhide or Format > Row Height
Using Excel 2007, I have a workbook with 7 sheets. The first one is a Navigation Page where I have checkboxes (form controls, not active X) with the names of the other 6 sheets. When the box(es) are checked, the sheet(s) become visible. I have accomplished this by assigning macros I recorded.
I need to now add the opposite: When the box(es) are unchecked, the sheets become hidden. From googling and looking for other threads/forums here, I gather that I need to add code/ VBA, but I know nothing about these at all.
I created an excel Calendar that has columns for months and weeks, and rows for hours of the day.
I have two drop lists one contains months, and one contains weeks.
Basically if you choose august from the first drop down list, all the rest of the columns that are not August disappear, and the sheet only shows august.
The second dropdown selects the week. If you choose week 1, it shows week 1 of this particular month. This second drop down is what I do not know how to make work.
This is the VBA code i used.
Private Sub ComboBox2_Change() Select Case ComboBox2.Text Case "May" Range("All").EntireColumn.Hidden = True Range("May").EntireColumn.Hidden = False
[Code] ......
I do not know how to make the code or choose the categories so that It only shows the week of the month chosen in the first column. Will I have to name each and every group of columns for each and every month as May - Week 1, May - Week 2...... June - Week 1, June - Week 2, etc... or is this a way around it?
I need to unhide 2 rows at a time starting with rows 28 and 29 IF cell N28:O28 > 0. I need this to be for rows 30 and 31 IF cell N30:O30 > 0, rows 32 and 33 IF cell N32:O32 > 0, rows 34 and 35 IF cell N34:O34 > 0, rows 36 and 37 IF cell N36:O36 > 0, rows 38 and 39 IF cell N38:O38 > 0, rows 40 and 41 IF cell N40:O40 > 0.
There is currently a formula in each of the selected cells that is why I was going for greater than zero.
I am attempting unhide the same exact rows in multiple worksheets in Excel, Print the entire workbook, and then re-hide the same cells. As I am still learning VB i have been unsuccesfull. I have attached the code that I am using,
Sub Printdoc() Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets
With sh Rows("105:116").Select Range("A105").Activate Selection.EntireRow.Hidden = False .PrintOut Rows("105:116").Select Range("A105").Activate Selection.EntireRow.Hidden = True End With
I highlighted a selection of rows and clicked HIDE, now I want to unhide certain rows and when I highlight the rows above and below and right click - unhide nothing happens. I need to Unhide to find something.
Is there an easy way to make a macro to unhide all rows? I can do this to unhide a certain range however different rows maybe he hidden and so a set range won't work.
I am trying to create a macro to unhide only a row at a time, from around 150 hidden rows altogether. It is basically to give the effect of adding extra rows to a "table" that a user could then input with new data (I have to do this way according to other set-up in the workbook), but this isn't very important to do with this question. When I do a Format<Row<Unhide from the Excel menu, it always unhides ALL of the hidden rows. I have fiddled around but can't seem to find a way to avoid this happening, all I want is for just one row to unhide. I thought it might depend what cell/s I had highlighted, but I haven't found a way that makes it work.
I HID 4 rows using this help section. (Format - Hide)
Then, I modified several column widths simply by placing my curser at the top of the column and pulling it smaller or larger. (I don't know if this did or did not cause my problem) which is simply that - I am now unable to find my hidden rows.
I know where they are supposed to be, but when I highlight them and click (Format - Unhide) nothing happens.
I tried (Find and Select - go to special) and no white bar shows up.
Can sombody please tell this frustrated Newby How to find the rows I just hid 1 hour ago?
If I posted in the wrong place, I appologise as I spent more time trying to figure out where and how to post than I did trying to solve my hidden row problem.
I have a button that I want to hide/unhide a section of rows.
This is the code a have so far:
[Code] .....
So I've named a a section of rows "rngHideRows". I've tried to use the command .Range("rngHideRows").EntireRow.Hidden = True (and viariants of this) but nothing I try works.
Private Sub Worksheet_Change(ByVal Target As Range) With Sheets("Sheet2") Select Case Target.Address(False, False) Case "B12"[code].....
I need to change it so that it hides a range of rows, say (6:26) instead of adding a line of code for each of the rows from 6 to 26 that I want to hide
Also how can I go about hiding the same rows on 5 more sheets, can I add more sheetnames after "Sheet2"?
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.
I have a code that will hide all rows that have a "-" in Colum A, leaving me with the useful data.
However, this data is pulled from a front sheet that has data added to it.
What I would like my code to do is to relook at all the hidden cells, and if their value has changed from "-" to what ever the data may be then to unhide that row, displaying the data.
I have a list box on a worksheet that contains the following names: field, vessel, pipe, structural. I would like to be able to unhide certain rows based on the name shown in the list box. For example, if I choose field it would unhide rows 3 thru 12, if i choose vessel it would unhide rows 13 thru 20, so on so forth. If nothing is choosen in the list box then rows stays hidden.
I have a workbook with multiple tabs. Each tab has about 600 rows. In each tab, I need to hide/unhide rows based on the value of a particular column in that row. For example,
Using the 4th column (that has either TRUE or FALSE), I need to hide entire row. I am using a loop on the range and hiding each row. But it is taking about 4 minutes for each tab to loop through the 600 rows and hide/unhide the required rows. Is there a faster way to achieve this? Following is my code.
Sub Toggle_Rows() Dim Cell As Range Application.ScreenUpdating = False For Each Cell In Range("D1:D600") If UCase(Cell.Value) = "TRUE" Then Cell.EntireRow.Hidden = Not Cell.EntireRow.Hidden End If Next Application.ScreenUpdating = True End Sub
I think this is fairly straight forward but my limited VBA skills have me going round in circles. I would like to have a button that hides and unhides rows where Column L has blank values but only from row 80 to 200 only. I would also like the button text to change from "Hide rows" to "Unhide Rows".
From Row 80 to 100 hide rows where there is no value in column LButton should be clickable to hide rows and then clickable to unhidebutton text changes.
I am struggling to come up with a vba code that allows me to search column B, Rows 21:89 for blanks then hide/unhide the associated row. I would like it to be one macro so that I don't have to have two buttons on the sheet to hide/unhide.
I have a macro that works fine with just numbers as a test run when I use it in the desired workbook/worksheets (where the values are returned via Indedx/match functions) there appears to be a small problem. (Below is the relevant post.)
[url]
Background is that I load raw data into a monthly account sheet which has the appropriate cost centre codes for allocating expenses.
I then use a vlookup in combination with indirect to place the summary data by costcentre code into annual worksheet.
I then have a summary sheet for printing purposes so I can print out a single month expenses by code to staple to the appropiate monthly costcentre statement. This is done by using Index & match functions looking at the annual summary sheet
What seems to be happening is that the code is sometimes recognizing formulas as a value & therefore showing zero values when I want only values 0 (as I sometimes have minus values).
Also sometimes when I go to unhide the all the rows it also is recognising some formulas as having value.
I'm using this VBA code which is hiding cells in rows 59:111. Some of these cells have formulas and some don't.
Private Sub Hide_Unhide() Application.Calculation = xlCalculationManual Application.ScreenUpdating = False For i = 59 To 111 Rows(i).Hidden = (Cells(i, "b").Value = 0) + (Cells(i, "b").Value = "") Next i Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = True End Sub Here is the problem I'm running into: I want this to run in the background so the user won't have to click anything to hide/unhide the cells whenever the options in the drop down list are changed and the data expands/collapses.
I am using several toggle buttons to hide/show rows of data related to the specific toggle buttons. I also want to hide and show the toggle buttons as well. When I try to do that the data underneath the toggle buttons is hidden but the toggle buttons don't hide with the cells.
A solution for the problem that I am having would be to have the ability to click on a cell as if it were a toggle button and hide/show rows of data when clicked.
OR
If there is a way to hide/show buttons as well would work too.
I've had luck with hiding rows with a checkbox, but I cannot get them to unhide when I uncheck the box.
Here's my scenario - (using Excel 2000) In an estimating spreadsheet I have a print range of A1:N74. What I'd like to do is add a checkbox or button so I can hide and unhide rows based on a null or zero in column range b5:b62. This is for printing purposes, but I can't get a 'beforeprint' event to work either. All I need is box checked and cells hide, box unchecked and cells show (unhide).
Sub CheckBox1_Click() Dim Rng As Range Dim MyCell As Range Set Rng = Range("B5:B62") For Each MyCell In Rng If MyCell.Value = "" Then MyCell.EntireRow.Hidden = True End If Next MyCell End Sub
I have a workbook that has 500 rows. In order to be able to print the spreadsheet, I have added a Macro in that hides any rows that have a "0" in the A column. I then put an if/then formula (ex. if(isblank(A5),0) so that if the cell was blank and 0 would be there and therefore the row would be hidden.
The problem now is that I want a new row to become unhidden everytime the row above has data in it. So, if row 5 gets data put into it, row 6 would become unhidden. The problem I'm running into is that the data in column A is peoples names, and therefore each row will have a different name (i.e. different data).
1. Is there a macro to do this?
2. (This may be a really stupid question, but...) Can you run 2 macros in the same sheet?
On double clicking a cell, I want to unhide the 10 rows below the target.
VB: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Cancel = True Range(Target, Target.Offset(10, 0)).EntireRow.Hidden = False End Sub
I thought this could should do it. But it only seems to want to unhide the target row (obviously unhidden anyway as i'm double-clicking a cell in it).
VB: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Cancel = True Target.Offset(10, 0).EntireRow.Hidden = False End Sub
This code unhides only the 10th row below the target.
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.....