I have uploaded a file to help explain what I'm attempting to do.
1) Click run to Hide all rows except number of rows in B1
2) Click run again to hide all rows
Similar to the code below but with the ability to set the number of visable rows dynamically using B1
Sub HideUnhide()...
That works great to unhide the desired rows but doesn't hide All rows on second click.o_O
First Click Unhide desired rows (value in B1)
Second Click Hide all rows except Row 1
Thanks for staying on this with me. I have a lot of VBA to learn still!
Yasser, That is perfect!
How would I amend to assign to a shape instead of worksheet change event? I know how to assign I just don't know how to move from Change event to module.
Yasser, Thanks for the quick response. The code you supplied hides the first 10 rows. I would like to have those be visible and hide the rest. Additionally, I want to make sure the rows beyond 100 remain visible at all times.
Thanks again for looking!
I am looking for code to hide/unhide Rows based on a cell value. Thanks in advance for your help!
For Example:
Range A1:A100
Reference Cell Value (B1) = 10
**This value needs to be dynamic
First Click Unhide A1-A10 (10 Rows)
Second Click Hide Whole Range
Attached below is the current code I am...
Non-VBA alternative that maybe you can use to get ideas flowing: Just quickly playing with the sample data available I can get to your desired solution with subtracting one SUMPRODUCT from another SUMPRODUCT using the first 15 characters. See the attached for an example.
The solution is a...
Make sure to select all of your raw data then when you create the Pivot table use Vehicle as the row and everything else is a value. You will want to ensure you are summing the other expenses and not counting them. You can change the header row to anything you like. Look at the Field List in the...
Shabbo, I would summarize all the data in a Pivot Table (see attached). That way when you double click on a value you get the detail that you are requesting.
P.S. The values in your original sample summary for other expenses is incorrect. (i.e. there are no Other Expense3 values for ABC FV 3208)
I had this very same issue last week. I reached out to Jeffery Weir after reviewing some techniques he recommended for someone else. http://stackoverflow.com/questions/39599449/vba-to-connect-slicers-looking-for-improvements-to-code/39604425#39604425...
Did you try adding the formula to the Name Manager then reference that Name in the Chart? You wouldn't need the "Sheet1!" piece though. If you have a sample workbook you can add that would make for better responses.
Does a simple Pivot table/chart with some slicers suffice? Without a better idea of what you are looking for in terms of a dashboard, I think a pivot table and Date slicer will work for you.
Welcome M1lls! You have arrived at the perfect place to get a flavor of a wide variety of projects and requests for help. While you are here you can offer solutions to others in need and peruse/learn from other ninja's solutions. Additionally, the site periodically host various contests like...
Sorry for the delay in response. I would not anticipate the formula slowing the workbook down too much. I use similar on a file with ~700 rows without noticeable slowdown. If the solution does cripple your speed considerably comment back and we can find a work around with another option.
Hi Mike,
I think there are a lot of good ways to get a unique list for data validation. I have attached a simple example that I use. Again there are many ways and I'm certain ways better than this example.
Actual source is from a contributor on this site: I saved formula from another thread...
Based on your data I'm not really sure which level(s) of data you are attempting to chart. Attached below is a simple tutorial for reference.
http://www.officetooltips.com/excel/tips/using_pie_charts_and_doughnut_charts_in_excel.html
Here is the sample file with both the array formula I purposed and the awesome non-array formula Nebu purposed. I modified both formulas to reference a fictional Price column because I think that was intended in the OP. If not you can modify back simply by changing the column reference (i.e. 2...
use Ctrl+Shift+Enter instead of single Enter
I added a quick dummy file for you to review. Note the criteria and arrangements of data are not in the same place as your data but this is a quick sample. Feel free to attach a sample of your own for better results.
You can use Power Pivot to weave together data from multiple sources. Have a look here and/or search Google for more tips. http://chandoo.org/wp/2013/01/21/introduction-to-power-pivot/