Over 1 million tech questions and answers.

How to automatically hide and unhide cells based on cell val

Q: How to automatically hide and unhide cells based on cell val

Hey all

New here and new to VBA so I apologize if this is the incorrect place to ask this question or if I'm not including enough information.

Basically I have two forms, one form that is a cost est. form and another form is a proposal form (client sees this one). I have the proposal form pulling information over from the cost est. form. What I would like to do is on the proposal form if rows c13:c277 are blank (no data pulled from the cost est. sheet) they will hide. But when I add data (a number) into the cost est. form the proposal form pulls that and unhides that row.

I've tried all kinds of VBA code and none seem to do what I want. I can get the rows to hide but then not unhide. I don't have code to show because I have deleted it when it didn't work. Any help would be greatly appreciated.

Read other answers
Preferred Solution: How to automatically hide and unhide cells based on cell val

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)


Is there a way in Excel (I'm running Excel 2010, but have access to older versions) to hide/unhide cells based on hyperlinks or defined areas? I've hyperlinked so that we could go to specific parts of the document, but that does me little good because we have to hide them or the doc gets to big. Is there a way to have the hyperlink (or the cell hyperlinked) unhide the area? I've attached the document (removed all company info, but the lay out is there) so that you can see what I'm referring to.

I've thought macros, but I'm not sure how to go about it... I did define each area for the hyperlink, so would that be the route to go?

A:Excel - Hide/unhide based on defined cells/hyperlinks?

Read other 6 answers

Hello to evrebody,
I have look into the answers and the solutions about "hide/unhide rows based on the cell data" but i am not abble to understand how its work and apply to my sheet.
On theattached sheet i explain what im looking for.
Pleaseo play it and hope to help me and give a solution please.
Thanks in advance.

Read other answers


Yesterday I created a code that hides/unhides rows when checkbox is clickedand goes something like this:

Rows("22:24").EntireRow.Hidden = Not Rows("22:24").EntireRow.Hidden

But now i only want to hide/unhide specified cells. So how can i modify the code above to do this or do I need some new code.

Thanks for help

A:macro to hide/unhide cells

"hide/unhide specified cells" - I take it, you mean rows, not cells.

What's your criteria for hiding/unhiding the row? All you need to do is loop through each row in your criteria column, and then program this in as your hide/unhide criteria.

Pseudo Code:


Sub hideAndUnhide()
[INDENT]For Each Cell In Range("A1",Range("A1").End(xlDown))
[INDENT]If(Cell.Value = 1) Then
[INDENT]Rows(Cell.Row).EntireRow.Hidden = True [/INDENT]
[INDENT]Rows(Cell.Row).EntireRow.Hidden = False[/INDENT]
Next Cell
End Sub

If you let me know your data layout, and your criteria, I should be able to make a proper version for you. Even better would be to post your excel sheet with dummy data (remove any sensitive data).

Read other 2 answers

i am using a userform with a listbox that a user chooses a value, that value is then placed in sheet 15 at cell 29, what i would like is if the value chosen is 6 then rows c6 - c25 in sheet 15 are unhidden otherwise they remain hidden, i have managed to do this before using checkboxes but not via a userform, any ideas for code please

A:Solved: excel hide/unhide on cell value

You need to trigger a macro which can be called from the form.

When a value is chosen, the macro triggered will be something like

To hide:
Range(Cells(6,1),Cells(25,1)).entirerow.Hidden = true

To Unhide:
Range(Cells(6, 1), Cells(25, 1)).EntireRow.Hidden = False

Read other 2 answers

I have a sheet with several hundred rows. Starting in Row 4 through the end of the sheet are mixed dates in column 1 and ALL rows from Row 4 through the end of the sheet hidden. I want to be able to type in a date in Cell A1 and have all rows that have that date in Column 1, Row 4 through the end of the sheet to become unhidden. Secondly, I would like to type some other code like "999" or something in Cell A1 to have ALL rows become unhidden. Thirdly, I would like to either type another code or just delete anything in Cell A1 and have ALL rows from Row 4 through the end of the sheet to become hidden again.
Tech Support Guy System Info Utility version
OS Version: Microsoft Windows 7 Professional, Service Pack 1, 64 bit
Processor: Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz, Intel64 Family 6 Model 23 Stepping 10
Processor Count: 2
RAM: 3963 Mb
Graphics Card: Mobile Intel(R) 4 Series Express Chipset Family, 1853 Mb
Hard Drives: C: 453 GB (298 GB Free); F: 931 GB (710 GB Free);
Motherboard: TOSHIBA, Portable PC
Antivirus: Webroot SecureAnywhere, Enabled and Updated

Read other answers

Hello to all,

I'm new to VBA in general and I'm in need of help in making my project works. I'm currently working on hidden in-sheet menu (rows 2 to 6) that could by unhidden by double-clicking on the cell "D1" and hidden again by double-clicking on "A6". I want to use that menu in every sheets.

I would really appreciate any inputs on this matter. Feel free to view my spreadsheet for a better idea.

Thanks in advance!

Read other answers

Hi there! I'm new to using these forums, but have spent some time scouring them from time to time to look for simple solutions to any excel/VBA problems I'm having. I consider myself relatively intermediate to advanced in Excel as far as formulas and spreadsheet creation goes, however VBA is foreign to me, and an area I'd love to learn. If any of you have recommendations on a good resource to begin learning VBA, please send it my way. And now....onto my macro question.

I've got a workbook with many tabs, and one or two input tabs feed information into another summary tab using various lookup and index formulas. There are any where from 40 to 80 rows to be qualified depending on the specific summary sheet (therefore I will likely need the macro to reference only the active sheet as it needs to work the same way on different sheets independent of each other). What I would like to do is if the result of the formula in column A of the summary sheet is "----------" (starts at A7) then I would like to hide that row, and if the data is changed on the input tab to result in anything other than the qualifying "----------", for that row to be unhidden. If this can be done dynamically that'd be great, however, if a button needs to be put into the spreadsheet to execute the macro, that will be fine too.

Thanks so much in advance for your help, and I promise I'll do my best to begin learning VBA so I can help contribute in return!

A:Macro to Hide/Unhide Rows Based on Results in Column Equation


Here is a code that may help you. You can copy and paste it too a module.
When you copy it to a module you can assign a "Short" cut key to activate the code.
To do this you select "Tool", "Macro" and when you see the name of the macro you want to run you can select it and then select "Options" and assign the short cut key. You will be able to use the short cut key on any active sheet.

Sub Hide_Row()
Application.ScreenUpdating = False
Dim Mysh As Worksheet
Dim cel As Range
Set Mysh = ActiveSheet
For Each cel In Mysh.Range("A1:A" & Mysh.Range("A65536").End(xlUp).Row)
If Not (Mysh.Cells(cel.Row, 1).Value Like "--*") Then
Mysh.Cells(cel.Row, 1).EntireRow.Hidden = False
Mysh.Cells(cel.Row, 1).EntireRow.Hidden = True
End If
End Sub

Read other 2 answers

Good day everyone.
Basically I need to have a formula in excel that includes auto hide and unhide of rows based on the result value. Attached is my sample exercise for quick reference. In this exercise, I want to hide automatically the rows under "REPORT OUTPUT" that contains "0" ZERO value. Basic guide: Once you enter value (from 1 to 5) in cell D3, report output will automatically calculate...... The missing condition in the formula is to automatically hide ZERO value.... Please help.
Thanks in advance.

A:Solved: Formula with auto hide and unhide rows based on result value

Read other 16 answers

I am trying to hide rows in excel 2010 based on cell values in a certain column. I know that I have to use the VBA but I don't know how to do that kind of stuff. I know it should be simple to do but I don't know where to start. Let me know what you need in order to help me accomplish this task.

A:How to hide rows in excell based on cell value

Read other 8 answers

Hi guys,

Can you please help me further expand the macro below? I need it to also look between the ranges of C24 and Z24 and hide the respective column. (i.e need some sort of loop)


if C24 is 0, then hide column C
if D24 is 0, then hide column D
Sub Hide_Column ()

If Range("H24").Value = 0 Then
Columns("H").EntireColumn.Hidden = True
Columns("H").EntireColumn.Hidden = False
End If

End Sub

A:Solved: Hide Columns based on value of cell

Read other 9 answers

Hi all, long time reader, first time poster. I searched around and have found similar queries to what I require however I haven't been able to adapt these solutions with any success so here we go....

I have a list of businesses in a spreadsheet with information such as name, phone number, e-mail, website, postcode etc. I would like a search box on the side, say in cell O2 where a user can input part or all of a postcode e.g. (LS19 or LS) and those that do not begin with LS would be hidden. The postcodes are in column G.

I'm trying to make this as simple and user-friendly as possible so employees can find businesses in a certain area with ease. Thanks in advance for any help and please feel free to ask questions.

Chris Needham

A:Excel VBA : Hide rows based on cell input.

Seems nobody had the answer so I found a work around myself. Just in case anybody else wants to do a similar thing. Using auto filter is the easiest way.

[SIZE="3"]Sub Search()
ActiveSheet.Range("$G$1:$G$999").AutoFilter Field:=1, Criteria1:="*" & Range("O2").text & "*", _
End Sub[/SIZE]

Where G is the column to search for and O2 is the users input data.

Guess this can be closed now, thankyou all for your help.

Read other 1 answers

Hi Guys,

Apologies for repeating an old question, but I am trying to build my spreadsheet so that it auto-hides any rows were there is zero premium outstanding for a client.

I had gone through previous answers, and I had tried to lift and amend some VBA code to achieve this. However, somewhere within this code or the way I've implemented it, there is an error, because it's not showing of hiding any rows.

Can you please take a look at the attached and fix it (in order to hide all rows with a zero in column C), and maybe point out what I was doing wrong or omitting. I have anonymised my data.

Many Thanks

A:Show/Hide columns based on cell contents

Apologies... the criteria column is actually F, not C, the "outstanding premium" column. The intention being to display only those rows where client still owe premium

Read other 1 answers

Hi All,

So I'm fairly competent in Excel in most things other than macros (which means it could be argued I know nothing about Excel...)

I'm looking for a way to automatically hide rows from a page. Essentially it's a progression tracking sheet that I've got, and I want things to stay on the sheet for only 5 days after the job is complete. I have a TODAY() function which I am using to determine whether or not it has been 5 days since completion.

Any advice would be more than appreciated and I thank you all in advance.


A:Excel: Automatically hide rows based on value

Bumping due to inactivity. Not sure if it's allowed but hey, I still haven't got an answer...

Read other 2 answers

Hi all,

How do you ensure excel autohides blank rows that are in various formats and still shows values that do have values? (eg. $.00)

This thread has helped:


However, for some reason - if the cells are in $.00 format and have values in them - they are also hidden.

Thank you,

Read other answers

I have built a simple timesheet for someone in my dept, which includes amongst other things:

- hours worked over a month,
- how many hours owed/extra worked
- a cumulative of this figure over the months.

The requestor wants to be able to type a letter such as 'e' to represent a 07:30hr shift. So they type 'e' and the cell contents change to 07:30. There are about 6 different codes.

Normally a Vlookup would work EXCEPT you can't change the contents of the cell your are working upon.....cicrular referencing!

I could see two ways forward: either a function that allows the above

OR (perhaps more favourably)

leaving the lookups until the hour calculations at the base of the form. i.e Instead of a simple Sum for the hours worked that month, it could read the values in the range, look them up from a table(vlookup), and then sum the looked up figures to give the answer in the 'hours worked' cell.

I vaguely remember this being possible from my university days but can't remember how.

Can anyone help me?

A:Excel 2003: automatically changing a cell's contents based on keyword entered

Read other 9 answers


My VBA/Macro knowledge is very basic, but I am able to record macros and edit them. I have a scatter plot (with 5 series) and I want to automatically change the line style (i.e. solid or dashed etc.) depending on the text in a cell. This is what I tried, but I cannot get the code to reference the cell which contains the text:


Sub Macro14()
' Macro14 Macro
ActiveSheet.ChartObjects("Chart 1").Activate
With Selection.Format.Line
.Visible = msoTrue
.DashStyle = msoLineSolid
End With
End Sub

For the line ".DashStyle = msoLineSolid" I tried ".DashStyle = Range("A7").Select" but this does not work.

Is there a simpler way to set-up a macro to format graphs automatically based on a cell content/format/colour, does anyone know a good guide to do this?


A:Excel Macro to automatically change chart line style based on cell text


I'm not familiar with charts. But, see if this helps.


Read other 3 answers


I cant seem work out a solution for what I'm trying to do. I have an Excel workbook that has multiple sheets. On sheet 1 i want the data from cell "G3" to be copied onto sheet 2. But i want the location on sheet 2 to be based on whatever was entered into cell "D3" on sheet 1.

For example: Sheet 1, cell D3 I have the name John, in cell G3 i have 68. I want "68" to be pasted in sheet 2 in cell B26.

But if the name in Sheet 1 cell D3 is Suzie, then I want G3 to be pasted in Sheet 2 in cell D26. So I would need to identify the paste location for each person.

I want the data to paste to the next cell so that the next entry can be pasted below the last entry for that person (for John the first entry would go into cell B26, then the next entry would go into cell B27 and so on).

But i want it to be a specific range, i dont want data to be pasted past 20 cells (cell B45). If possible a message box could be created to let the user know that the max is reached.

I would appreciate anyone's help with this as i have been struggling for awhile to try to get this. Thank you

A:Excel - Copy paste cell into range based on another cell

Read other 12 answers

I have a sheet set up with the list with the description (text) in column B, and summary scores (numerical, percentage) in column D. I want to do a summary row at the top of the sheet that pulls the data from the B cells, based on the lowest 3 values in column D.
I plan on using the formula =SMALL(D7:D32,1) (with d7:d32 being the list of percentages), to figure out the lowest 3 values. But the formula just pulls the summary score, not the description. I want to pull the description into but I am at a loss.
I am using excel 2013 on windows 10. Any help would be appreciated.

Read other answers

I have a sheet set up with the list with the description (text) in column B, and summary scores (numerical, percentage) in column D. I want to do a summary row at the top of the sheet that pulls the data from the B cells, based on the lowest 3 values in column D.
I plan on using the formula =SMALL(D7:D32,1) (with d7:d32 being the list of percentages), to figure out the lowest 3 values. But the formula just pulls the summary score, not the description. I want to pull the description into but I am at a loss.
I am using excel 2013 on windows 10. Any help would be appreciated.

Read other answers


I am attempting to clear 2 cells, based off the value of another. I am pretty sure the code is correct, because it works within another Macro. Thanks.

Dim p As Long
p = Cells(Rows.Count, "a").End(xlUp).Row

For i = 1 To p
If InStr(1, Range("k" & p), "None") > 0 Then Range("L" & p) = "" And Range("M" & p) = ""
'If no Issue, Location/Obsevations should be blank
Next i

End Sub


A:Solved: Clearing Cell Contents Based off other Cell

try this variation;

Dim p As Long
p = Cells(Rows.Count, "a").End(xlUp).Row

For i = 1 To p
If InStr(1, Range("k" & i), "None") > 0 Then
Range("L" & i) = ""
Range("M" & i) = ""
End If
'If no Issue, Location/Obsevations should be blank
Next i

End Sub

Read other 2 answers

I have my taskbar set to hide. When I move my mouse to the edge of the screen, it will pop out sometimes and sometimes it is necessary for me to size-down the program that fills the screen, move the mouse to the edge of the screen again and it pops out but goes behind the program that partially fills the screen.

This has me believing the taskbar pops out all the time but behind whatever maximized program is on the screen. This behavior is not restricted to one maximized program and is sporadic.

See screen shot.

A:TaskBar set to hide, will not unhide

Read other 7 answers

Hi All,

Is there any shortcut key/command for hiding and unhiding folders in Vista?


A:Hide/Unhide Folder

Welcome Unirock

Hope that this is what you are looking for.

Use Keyboard Shortcut To Show/Hide Hidden Files & Folders

I suggest that you make a system restore point before trying.

Hope that it works.

Read other 3 answers

with regards activex checkboxes in excel, i know you can hide or unhide the said boxes by going to properties and changing the visable section from true to false, can this also be done by using code so if a visable checkbox on the worksheet is ticked this will then display other hidden checkboxes
your help is appreciated

A:Solved: hide unhide excel

Yes, that can be acieved. The best thing to do is attach a copy of your workbook (replace sensitive data with dummy data), so that we all can take a look at your worksheet(s) structure.

Read other 1 answers


I have a button that when clicked calls a fucntion "customtoolbar.hidden = true" to hide the custom toolbar. When I wish to unhide the toolbar, I go to view > toolbars, however I noticed that the customtoolbar is still checked and when I click on it the toolbar does not appear!

Any ideas why?

Thank you



A:[SOLVED] Hide/Unhide toolbar


Welcome to TSF!!

If I am understanding you correctly you are wanting to make your toolbars appear and then re-appear. The simple answer the that question is to use the F11 key. That will make all your tool and task bars disappear. Then when you want them back just hit F11 again. I wouldn't bother with all this changing the about:config if you don't have to.


Read other 2 answers

I have two issues that I am banging my head over.

1) I have a page with 4 tables. The top 2 tables each have a link that when clicked will bring up one of the bottom two tables. I have this working now where the bottom tables are hidden until the link is clicked then becomes visible.

The problem is the space is still being taken up by the other hidden table. So if I click the second link, there is this huge gap and then the other table is visible. Any idea on how to not have the gap? I tried using "document.write" but the way I wrote it screwed up the layout.
2) Problem two is similar. I have a form select, that when option 2 is selected I would like to make a table visible. I tried using the same code as the one above with an anchor tag on the second select but it did not work. I then changed it to onSelect and still nothing. Any ideas on how to make a selection make a table visible?

Thanks in advance.

A:Hide/Unhide tables in pages

Read other 8 answers

Hi Guys

I used unhide.exe after a virus I had... it done the trick.
However, is there an easy way to re-hide all the system files that were hidden before?

Thanks for any help.

A:How to re-hide system folders after using unhide.exe?

Hello, depending on your Operating System you should just need to reverse the change that was made. Look at your system in this guide and put the checkmark back in the box.How to see hidden files in Windows

Read other 7 answers

First Hi,
Second, I'm not sure this is in the right section, my apologize if I made it wrong.

Third, my weird problem,
In Windows Explorer, I have set the option to see hidden files and system files and I do see them. The problem arise when I try to "unhide" a file. I right-click the file and choose "Properties", bottom I see Hide option box, it is checked but also greyed out so I can't "uncheck" it.

Anyone knows why and how can I fix this?


A:Hide/Unhide option unavailable in explorer

I have found part of the solution.

Going through command line I found out that the files were marked as System along with Hidden. I used the command Attrib to remove both and now I can hide/unhide the file. Is there anyway to unflag "System" from Windows Explorer. I don't mind doing it from the command line but would be more "practical" from Windows Explorer.


Read other 9 answers


I want to no how I can hide gadgets from the command line.

I'm constantly frustrated by the fact that the gadgets layout is destroyed when I rotate my screen. So I set a scheduled task to unpack and overwrite the ini file for the gadgets.
But it doesn't work reliably (nothing does with the pathetic task Sheduler). The task doesn't run on time (or doesn't run at all) and such the layout is still broken. So I was thinking I could hide it via command line, restore the ini, then show them again. (With three tasks with a delay, because the task scheduler is garbage and it wont work otherwise, if it'll work at all.)

Read other answers

I am building an excel model and want to link a macro to the "calculate" button based on the above check boxes. If the boxes are selected, the relevant graphs would need to unhide and show and then hide as the boxes are deselected again.

I've attached a screen shot of what I'm working on.

I would appreciate any help possible on how to write the code for this macro.

Many thanks

A:Excel 07 - Macro to hide/unhide rows

Welcome to the board.

Screenshots saved as bitmaps are huge. Convert them to (e.g.) jpgs, then you can upload without zipping.

Re this part of your post specifically:

Macro to hide/unhide rows

, one "basic" answer is:

Private Sub CheckBox1_Click()
If CheckBox1 = True Then
Rows("11:20").EntireRow.Hidden = False
Rows("11:20").EntireRow.Hidden = True
End If
End Sub

Do you actually have ten charts, or is it far more in reality?

Read other 2 answers

I hid columns D through AN on a spreadsheet. I then realized that I needed some information from column D. Is there a way to unhide one column from a group that you've hid Right now I have to unhide one column at a time to get back to the one that I need. Any help would be appreciated

A:Solved: An Excel Hide/Unhide Question

Press F5 -- type D1 -- press Enter.

Then Format > Column > Unhide.

Read other 2 answers

I have my W7 set not to show hidden files and folders.

To show them I go through the usual process , open Windows Explorer then click on the tabs Tools > Folder Options > View and then change to "Show hidden files ...." Naturally have to go through this process again to hide.

Is there a simple keyboard shortcut or some way that I can easily toggle the hiding and unhiding of all folders and files. Not just on individual folders , but have all folders and files that are set to be hidden , to hide and unhide in a simple keystroke.

A:Shortcut to hide and unhide folders and files

Is this what you're looking for?

Read other 8 answers

I am looking for a way to hide and unhide specific files/folders of my choosing. I imagine this can be done via a method or third party program that creates two options in the right-click context menu:
1) Hide selected files/folders
2) Unhide all files/folders

I am open to other suggestions or ways in which this can be done, of course.


A:How do I hide/unhide specific files of my choosing?

Hello Mark,

You could use the tutorial below to actually hide or unhide a specific file or folder.File and Folder - Hide or Unhide
However, when you choose to show hidden files, it shows all hidden files and not just select specific ones. If you like, you could use the tutorial below to be able to toggle showing or not showing hidden files in the context menu.Show - Hide Hidden Files - Add to Context Menu
Hope this helps,

Read other 9 answers

Hey ya'll,
I have 5 tabs of subforms in Access 2010
Only the first tab is visable.
I only want the rest of the tabs visable if associated checked boxes on first tab are checked.
For example, the check boxes on first tab are:
- Registrant is going to volunteer
- Registrant is a veteran
If those boxes are checked then the associated tab (volunteer info tab) is rendered visable.
I assume this is going to need VB code on either the tabs event, or the first form event, or the check box?
Thank you

A:Access Unhide tabs based on checked box

Yes you need to add some VBA code to the "After Update" event procedures of the Check boxes.
It would be something like
if me.checkboxname = -1 then
me.tabname.visible = true
me.tabname.visible = false
end if
where checkboxname is the actual name of your checkbox and tabname is the name of the tab to be made visible.
The VBA editor should offer you the correct names of the controls on the Form.

Read other 1 answers

Alright, here's what I got going on:

I want to be able to have a completely clear desktop, void of icons and start toolbar with a hot key. However, I would like to be able have access to the start toolbar and able to have desktop icons available to me. This is where the hot key would come into play: the ability to hide/unhide both sets (icons and toolbar) simultaneously. Does anyone know of a program or registry hack that would accomplish this?


A:Hide/Unhide Start toolbar & Desktop icons

what is a start toolbar?

there is this for the icons :

clik here

Read other 2 answers

Hi! Good Day!

I cant find ways to automatically hide & unhide row depending in G14, G15 & G17. I dont know if it is applicable to Excel. Even if the solution is in other programming language, then its ok to me.

If G14=4 & G15=3 & G17=2 then hide row 28 to 29 & row 36 to 38 & row 43 to 46

I have attach a file for reference.

Thank you so much!

A:Auto Hide & Unhide Rows per data input

This is on the assumption that your rows are not fixed and that your code is AB#.

Read other 1 answers

I know about right-clicking the Desktop > View > Show Desktop Icons.

But now I am looking for a HOTKEY to simply hide or show the desktop icons.

I found some instructions on google that seem to work for windows xp but they don't work for me on windows 7.

Do you know of a way to accomplish what I want?

A:Solved: hide and unhide desktop icons hotkey?

Read other 7 answers

I know about right-clicking the Desktop | Properties |Arrange Icons By | Show Desktop Icons. But I do this so many times during the day that I would like a hotkey for this. Preferably one key, not a key sequence.

Do you know of a way to do what I want?


A:[SOLVED] hide and unhide desktop icons hotkey?

Hi Cindy,

My boyfriend needed a solution like what you described and he ended up buying this nifty tool. He loves it:


I hope this helps.


Read other 8 answers

I will eventually want this to work on all worksheets in the workbook as their data may change as the "linked tables" are refreshed. The linked tables are from Access.

What I want to do is look in column Q to see if the result of the calculation in that cell is 0. If so, I want the row hidden. I don't want to hide empty rows, just the one where the calculation =0. If the data in the workbook, i.e. the linked tables are updated, then I want any rows that have changed from 0 to another value to then become unhidden.

I have been searching for VBA code to auto hide/unhide rows in Excel 2007 based on the value in a specific column. I found the following code, but can't seem to get it to work quite right. I changed some of the criteria to fit my worksheet. The problem is that it hides all rows that are empty even though I changed the criteria from "" to 0. Also, this does not unhide rows that may refresh with a value.

I would really appreciate some guidance. My Access and Excel skills are pretty good, but when it comes to incorporating VBA into the mix, I get a little lost.

Sub HideEmptyRows()
'This macro hides all of the rows which are empty, for printing.
'created by Geoff Faulkner 12-29-2004

'Declare variables
Dim intStartRow
Dim intEndRow
Dim intTargetColumn
Dim intCounter

'set default values
intStartRow = 6
intEndRow = 2000
intTargetColumn = 17

'cycle through each row in the range
For intCounter = intStartRow To ... Read more

A:Solved: Excel 2007 Auto Hide/Unhide Rows

Read other 6 answers

I built my pivot table now I would like to be able to hide/unhide certain elements in my pivot table. How do I do this? is there a way to toggle on/off certain elements I want to appear without having to reselect elements for the table?

Read other answers

Hi guys

Is there a way to unhide the next hidden row (out of all hidden rows in the sheet) based on the location of the button clicked?
Basically what I need is a macro that works with any button (without specifying a concrete name for the button). Based on the row where clicked button is located (there will be cca 15 of them on the sheet), ie row 15, it will unhide next hidden row but leave all hidden rows above hidden.

Hopefully, I didn't confuse you too much.

Thanks a lot!


A:Solved: Excel: Unhide next hidden row based on button position

Read other 10 answers

Dear Brink,

Is it possible to disable/re-enable or hide/unhide Start Menu in Windows Vista via registry, using VB6 or at least disable/re-enable all items in (shortcuts and everyrthing else in Start Menu) in order to exclude starting of ANY program via contents of Start menu in Vista while my own application is active?

Could it be possible to disable/re-enable "Windows" key or any combinations of keys such as "Windows" + "Esc" via registry, using VB6?

Thanks in advance for your help.


A:Disable/re-enable or hide/unhide Start Menu in Windows Vista via registry, using VB6

Hello Vnaz235, and welcome to Vista Forums.

I'm not sure what you mean by the first question. Did you want to stop a startup program from running?

This tutorial will show you how to enable/disable all Windows Key keyboard shortcuts.

Windows HotKeys

Hope this helps,

Read other 5 answers

I have a database that consists of the following:
Col A: case number (e.g. 1993-01-115, 2002-11-078, etc.)
Col B: username (e.g. John Henry, Jane Doe, etc.)
Col C: hours (number of hours each user worked on case number)
Col D: case owner name

Col A contains repeats of some case numbers and is sorted ascending
Col B contains repeats of some usernames

I need to add the hours in Col C depending on:

Each time a unique case number is encountered, check Col D (case owner name) and lookup this name in Col B (username) and sum the hours for each instance the case owner appears.
Database example:
Case No Username Hours Owner
1993-01-115 Jane Doe 2 Jane Doe
2004-05-020 John Henry 1 Theresa Chan
2004-05-020 Theresa Chan 2 Theresa Chan
2004-05-020 Theresa Chan 3 Theresa Chan
2004-05-020 Larry Roberts 1 Theresa Chan
2004-11-072 Andrew Dunn 1 Andrew Dunn

So using the above example, case 1993-01-115 owner is Jane Doe and total hours is 2, case 2004-05-020 the owner is Theresa Chan and total hours is 5, case 2004-11-072 the owner is Andrew Dunn and total hours is 1 and so on.

Could someone help me write a formula to accomplish this? Thanks!

A:How to sum cells based on conditions

Read other 7 answers

I have query in MS access 2003 which has a field with both + & - figures - i want to spilt this field into the + and - components. Does anyone have any suggestions how i can do this - would if statements work??


A:Copying cells from one cell to another

Just do a greater than/equal to zero and a less than/equal to zero. You should only have the equal to on one side or the other. Yes, an if statement would work.

Read other 1 answers

Need an excel formula that will look at four cells, if the sum of them are zero then I want it to make another cell red.

44.000 0.00 0.00 0.00 0.00
6215.068 1243.01 621.51 3542.59 807.96
This would result in 44.000 turning red and 6215.068 not turning red.

Thanks for your assistance.

A:If sum of 4 cells is = to 0 turn another cell red

Easy enough! Highlight the cells (not the whole column) you want to change when the condition is met (I am assuming they are in column A and the rest of the data in in columns B, C, D, and E).
Go to Format, Conditional Formatting.
In the box, change it to read when the Formula is and then enter the following in the box:
Then click on the Format button, click on Patterns, and select your color.
Click OK.

Read other 1 answers

Hi All,

Very new to this but have a look at the attachment and see if you can help.

I've used the code

Sub Loading2()
Dim LastRow As Integer

LastRow = Worksheets("Table").Range("A65536").End(xlUp).Row

Sheets("Input").Range("B5,D5,F5,H5,J5,L5,N5").Copy Sheets("Table").Range("A" & LastRow + 1)

End Sub
Sub Supplying()

Dim LastRow As Integer

LastRow = Worksheets("Table").Range("A65536").End(xlUp).Row

Sheets("Input").Range("B5,D5,F5,H5,J5,L5,N5").Copy Sheets("Table").Range("A" & LastRow + 1)
Sheets("Table").Range("D" & LastRow + 1).Copy Sheets("Table").Range("H" & LastRow + 1)
Sheets("Table").Range("E" & LastRow + 1).Copy Sheets("Table").Range("I" & LastRow + 1)
Sheets("Table").Range("F" & LastRow + 1).Copy Sheets("Table").Range("J" & LastRow + 1)
Sheets("Table").Range("G" & LastRow + 1).Copy Sheets("Table").Range("K" & LastRow + 1)
Sheets("Table").Range("D" & LastRow + 1).ClearContents
Sheets("Table").Range("E" & LastRow + 1).ClearContents
Sheets(&qu... Read more

A:Copying cells based on Criteria in VBA


You attached a workbook but I do not see an example as to your request.
Please provide an example a before and after code.

Read other 1 answers