excel multiple checkbox selection automation - excel

I am trying to create an Excel spreadsheet,
The user can select as many task scenarios as they want, once they are done I want to automate the responses separating it by task.
For examples there are check boxes with following tasks:
Make bed
brush teeth
mop floor
fold laundry
Then once the user selects the tasks they are looking for an out put below will show: (comma's separate cells)
Make Bed
Who's responsible, how do they make the bed, how long should it take the bed
Brush Teeth
Who's responsible, how do they brush their teeth, how long should it take to brush teeth
etc.
I currently have a macro set up that when a user selects check boxes, I put in a formula that states if checked then show "xxxx" and hard coded in each cell for each task) issue is when not all check boxes are checks then there are blank cells and bottom ones could get lost, and does too nice option since the formula states if its not checked its blank.
Another nice to have would be having user selecting task and user group, that way I could show that user groups tasks for that task as opposed to many task items for the overall task that are irrelevant to the user. I hope its clear.

Related

Automate a web user task

I need to schedule an appointment at a government office via their website. Since all timeslots are occupied, I need to recheck the site until a timeslot opens. The first screen has a button to press, the second screen: a radio-button to select, a check-box to mark and a button to press, and the third screen is a calendar as so:
Months June-August are open, so I need to iterate through these months in the drop-down. So if a day is colored yellow this means there is an open timeslot.
I need to automate the process of checking for timeslot availability, so if there are open timeslots (a yellow colored day) I will get some notification e.g. by email. My question is what is the best tool for the job & pointers on how to implement my specific scenario using that tool be it an existing app/extension (best) or a program (Python?) I should write. If it's a Python script, I will be happy to get some sample if possible.
Thanks for any suggestions.

CodeModle.Insertlines drops variables

After several days of searching Excel vba forums I have finally given in and must now ask for help.
The problem is that CodeModle.Insertlines causes excel to drop all variables. I have a couple arrays that I need to use / check boxes and list boxes etc. all get wiped when I run the code below
With Application.Workbooks(ActiveWorkbook.Name).VBProject.VBComponents("UserSavedQueries").CodeModule
.InsertLines 2, "tmp = " & """" & "THIS IS SOME SAMPLE TEXT " & """"
End With
I fully admit that the Insertlines was a bit of a work around as a way to an end, but that way now seems blocked. Please can someone advise how to insert lines into a module without resetting all variable?
For the bigger picture (and for someone to advise how I probably should have tackled this in the first place)
I have a sheet that pulls together a bunch of parameters from list boxes, checkboxes cells etc when a user selects the ‘Go’ button.
the selections are formatted to make a JSON message that is sent to an API and the response is displayed in a table on a second sheet.
To give some context, Imagine Listbox1 called “search criteria” with selections of “Manufacturer, Colours, Countries”. Listbox2 called “Filters” changes context depending on the selection on Listbox1. So we could have for Listbox2: “Ford, BMW, Nissan” , “Red, Blue, Green, Black, White”, “ ”. Not the actual data but it shows the varying length of each selection. There are actually around 12 available selections some of which have 100+ filter options.
The user may select “Ford, Red” which would return red Fords in all countries or “Ford,BMW,Green,Scotland” which would just Green Fords and BMWs in Scotland.
All of this works nicely.
NOW: I need to add the ability to have “Saved User Selections”. I need to avoid dumping these selections in a worksheet (even hidden) as it allows the user to “fiddle” with the shape and format of the selection which will break the JSON parsing. So I decided to save the user selections in a VB module. A UserForm provides the ability to Name the saved selection, date-stamp it and runs the code above. Parsing the UserSavedQueries module returns a listbox of all saved selections, which, when double-clicked are intended to populate listbox1 & 2 ready for the user to hit ‘Go’.
Considered options: I haven’t ruled out saving to an external file, or maybe even registry, but would prefer to keep self-contained within the one file.
This article came closest to helping, but I'm not sure how it would work for my use-case

How to hide text in certain cells from a script?

Windows 10, Google Sheets, LVL: Rookie.
So I have a sheet, that is kinda like a scoreboard, the main purpose of it is to do scoreboard things, but that's irrelevant. Basically, for new people that use the sheet, I have green sentences near cells to show them what goes there, kinda like tutorials.
But, for people that have used the sheet for a while, they are going to get tired of all this extra space used up by green sentences that don't actually teach them anything cause they already know it.
SO I wanted to create a button from a UI box, that disables tutorials (Just hiding/deleting these green sentences), and whenever they wanted to see the tutorials "sentences" again, they could use another UI Button to enable them, which unhides/adds the text back in the cells.
I already have the UI Box setup...
The only thing I don't know how to do or what to code, is hiding/deleting these sentences, and being able to unhide/paste the sentences.
Now, if this can be done in an easy formula, please let me know, but otherwise, please help me write out a script for this. I will credit you if you wish.
You have a complicated spreadsheet that included about 25 text "hints" to user. You want experienced users to have the ability to "hide" the hints if they wish.
You could do this with a checkbox.
Untick (the default): the comments appear.
Tick the box: the comments are hidden
Create a checkbox (say, it is in Cell G1),
Edit all your hints along these lines.
=if($G$1=TRUE,"","Team name goes here --->")
Explanation
$G$1=TRUE`: this means that the check box has been ticked
if TRUE, then display nothing: ""
if not TRUE (the checkbox is NOT ticked), then display the hint. Such as "Team name goes here --->"

SSRS - Merge Cells of Same Data Vertically

Please see attached screenshot as I think this will help show better. I have an SSRS report, in that one column can have the same value across many rows. For this report, you can see Site column has a value of "JAC-FL". How can I "merge" this so it only appears once (See screen shot of "Excel Layout" as I know how to do this in Excel). For the life of me, I cannot seem to get this.
I already have a rowgroup defined for the data (see Row Group screenshot) (Please note, there is data for Username, but I removed it so it wouldn't appear in the screen shot).
Site = lvl_2_value, UMFullName = User Name, stream_3_Stream = Stream
I cannot seem to get my Site (I plan on doing this to the other columns as well, but thought if I get the first to work, I can do it to the others) to appear like the Excel layout. Would anyone be able to help?
You'll want to split out the rows into child groups, instead of grouping on all of them at once. Take a look at the bottom left of your first screenshot, you can see the "row groups" section there.
If all you see in that box is a line that says "(Details)", then you will need to start by right-clicking that and adding a parent group. Then you can add a child to that parent, and so on, going from most inclusive to least inclusive. So for example, if we were working with locations, we could do something like Country > State/Province > City).
example
It may be easiest to start a new tablix (keep your old tablix until you're done though so you can copy and paste expressions and get the formatting right again!), as things tend to get shifted around when you add groups to an existing tablix.

Excel available resources

So in the last week Excel (2010) has started coming up with this error message when I select the entire file using the arrow in the top left hand corner of the sheet: "Excel cannot complete this task with available resources. Choose less data or close other applications."
But if I just select the columns it will sort. it's only when using the select all button in the top left corner.
None of my memory usage seems outrageous on my machine. I have closed all other programs and just used excel, but no dice.
Any bright ideas?
Is the formatting on everything uniform or at least somewhat uniform? Sometimes if i have different elements in bold or with a solid background etc that gives me issues from time to time...

Resources