Using a checkbox to hide a row - excel

I'm trying to code a macro that uses a checkbox click to hide the row the checkbox is in. I've a task list of about 100 tasks and want to assign each row its own checkbox, so when the user clicks the box the row gets hidden from the remaining tasks.

The following video is a tutorial on how to accomplish hiding a row using a checkbox (you'll see your specific functionality at 4:10 in the tutorial video):
Creating a Checkbox to Hide and Unhide Rows in Excel
Rather than creating only one checkbox, you'll want to create one per row. So if you have 100 rows, you'll be creating 100 checkboxes.

Related

save combobox value when manually selected

is it possible to write the value of a combobox to a cell but only when a user selects an item from the combobox but not if the userform refreshes and clears the combobox?
Szenario: I have a userform with 3 comboboxes. In these 3 comboboxes, the user chooses 3 items. Below these comboboxes, there is another combobox where the user can yet again chose an item, however, the given items are the previously selected items.
I solved the situation by using combobox.click and save it to the spreadsheet everytime it gets selected. However, if I now refresh the userform the cells get changed to empty and the cells get cleared out (as combobox.click gets triggered by that as well).
Anyone got an Idea?
Although this is mainly a theoretical question, I will be happy to provide any specific code. As my current code is over 2000 lines, it would be a bit much for SO.

How can I create a button on excel that automatically moves me to a specific row?

My excel sheet has a lot of rows where I go over different problems. Is there a way to create a drop down menu at the top of my sheet that can automatically take me to a specific row depending on what problem I want to look at?
I know how to create a drop down menu with all of the problem names, but I don't know how to link each name in the drop down menu to a specific row number to move the screen down.

Excel: Return the last entries from a list of entries

Please excuse me for the wording of the title. Not sure exactly how to word this so it's probably best to just show.
I have a list that looks like this
Name Date Updated
==== ===========
Item 1 1/1/2015
Item 2 1/2/2015
Item 3 1/3/2015
Item 2 1/4/2015
Item 3 1/5/2015
Item 1 1/6/2015
This will be an ongoing list. As items are updated they will be entered in like this. I would like to create a second sheet that gives me the last date that each item was updated. So the result based on the above table would look like this.
Name Date Updated
==== ===========
Item 1 1/6/2015
Item 2 1/4/2015
Item 3 1/5/2015
I have found a few solutions on the web that work when I first input the formula (Links below), BUT when I add more entries in the first table the results wont update or they'll show the wrong data.
Links:
http://blog.contextures.com/archives/2014/02/04/find-last-item-in-group-with-index-match/
http://www.get-digital-help.com/2014/02/07/find-last-matching-value-in-an-unsorted-list/
Thanks in advance for any help.
You can simply omit the numbers in the formula to get the whole column:
=INDEX($C:$C,MAX(($E$3=$B:$B)*MATCH(ROW($B:$B),ROW($B:$B))))
(following the formula from your second link).
You can record a macro as you do it manually one time. Then assign that macro to a button. Then click the button anytime you need the sheet updated.
Steps:
Start on a sheet other than the one with the data. Explanation in #3 below.
Start recording your macro by going to View > Macros > Record Macro. In the bottom left you'll now see a square stop button for when you want to stop recording.
Select the sheet with the data. This way the macro will always remember to select the right sheet regardless of where you are.
Select the two-column range of cells that has your data, then continue selecting a few hundred rows down, or at least well beyond where you think your data will eventually go down to.
Copy
Select the sheet where you want to have the summarized data.
Paste
Sort by name (ascending) and date (descending) all at once (rather than two operations). Do this by going to the Data tab in the ribbon and selecting the white and blue sort button that has two A's and two Z's and says "Sort".
With this pasted and sorted range still selected, remove duplicates in the name column. To do this, do not change the selection. Go to the Data tab and select Remove Duplicates.
Now your items will appear once and the date will be the most recent date.
Click the "stop recording" square blue button in the bottom left to stop recording your Macro.
You can assign this macro to a button or to a shortcut. To add a button you need to show the developer tab and then draw the button using one of the options on the developer tab. I can't remember offhand how to show the developer tab. Once you have a button, right click and assign the macro to the button.
13A. If you want to customize the macro, click ALT+F11 to get to the visual basic editor. Double click on one of the things named something like "module" on the left and you can edit your the range in your macro, for example if your data suddenly goes down 100 more rows than what you planned and you want the macro to cover it. Save with CTRL+S. The next time you run your macro, it will reflect these changes.
13B. View > Macros to edit your macro if you want to assign a shortcut key to it instead of adding a button.
Try all this with a copy of your spreadsheet so that you don't delete data by accident.
Does it work for you?
You could easily do this with a Pivot Table. Drag Item to Rows area and Dates to the Values area. Then format the values as Date, and select to return Max.

Multi option custom MsgBox popup window

I am not sure if this is even doable in Macro (VBA). The issue is, if a user enter a value in specific cell (lets say A2). I need to trigger a popup window (similar to MsgBox function) with several option for the user to select in the popup (either a drop down list or Radio buttons). The values in the drop down list or Radio buttons can be populated in the code. I need to let the user select the option "value" from the list and then can click OK or Cancel. The value that the user selected would be display in the same cell. I checked online and it seems like there are very small selections for the MsgBox function. Can this be done??
Thanks,
Your best option would be to use Data Validation to make a drop-down list.
If you go to Data-Data Validation-Allow-List you can create a drop-down list of all values you want. Store all of the values you want in the drop-down list on another sheet and just set it as the Source.
Any other issues let me know.

excel group with hidden rows

I have an Excel sheet where several rows are grouped together using "Group and outline".
By default the group is to be expanded but I have one row that I have hidden using vba in Workbook_Open.
After I click the [-] to collapse the group and then the [+] to expand it again my hidden row is now visible.
Is there a way to keep the hidden row hidden even after the group is collapsed and expanded again? Or is there a way to capture an event so that I can use vba to hide the row every time the group is expanded?
From a link on another site Excel VBA Trap the Group and Outline expand/collapse (Show Detail / Hide Detail) events
What it states is
the only event you can trigger with a
group collapse/expand action is the
calculation event. To do so you need
to use the SUBTOTAL function which is
aware of whether or not rows are
hidden.
I hope this helps you

Resources