Dynamic/Dependent Dropdown List Without Apps Scripts - google-sheets

I didn't want to use Apps Scripts at first because I was too lazy to learn it but now I find it Way more fun to try and wrok around the limitations of using formulas only.
PROBLEM:
So I'm trying to do is to make a Dynamic/Dependent Dropdown List without Using Apps Scripts.
SOLUTION:
Using INDEX To Change the C Column based on A2's Value, And make B2 Dropdown list from C:C
SOLUTION's PROBLEM:
So the plan is to make these Dynamic/Dependent Dropdown List in every Row, Thus needing a Column for every row.
SOLUTION's PROBLEM's SOLUTION:
Using TRANSPOSE we can make the list change from Vertical to Horizontal
THIS WORKS GRRRRRRREAT, this means that each row will have its own list on the same row AND if the list becomes longer, the TRANSPOSE function will add columns by it self as needed... but there's a small teeny tiny pet peeve with it.
SOLUTION's PROBLEM's SOLUTION's PET PEEVE:
So I want the sheet to look good, I don't want the data holder cells to show, so I can simply hide the columns... BUT if the list gets longer, it will add columns and they won't be hidden
SOLUTION's PROBLEM's SOLUTION's PET PEEVE's SOLUTION:
I found that if you group the columns, it gives you a little button at the top that if you click it then it will hide all the columns in the group, And if you includ the last column in your sheet in the group, then any new columns will be added to that group.
...... Okay last one I swear.
SOLUTION's PROBLEM's SOLUTION's PET PEEVE's SOLUTION's PET PEEVE:
It's true that it will group any new column will be added to the group, BUT it won't hide them.
If you just double click the -/+ Button then it will hide them... okay I lied about it being the last one.
SOLUTION's PROBLEM's SOLUTION's... Problem....... ah who cares
Having the columns grouped does make it easier to hide any new columns, but i'm not looking to make the manual easier, I want to fully automat it... also I hate the big bar that's always there when there's a grouped columns.
Unrelated Fun Fact: did you know that using the comment function returns a 0? I didn't...
so isblank in =isblank(J20 + N("This is a comment To say that J20 is indeed blank")) returns FALSE
TL;DR I'm looking for a way to auto hide any new columns created after column D for example OR use another cleaner way to make Dynamic/Dependent Dropdown List without Using Apps Scripts.

Related

Vaadin grid user column re-ordering and saving per user

How do people tend to let users re-order the grid columns and save that ordering for later?
The only way I can think of to do it, at least in Vaadin 7, is:
Listen for column re-ordering via addColumnReorderListener(…)
When re-order triggered, if user initiated, get columns from getColumns() and save to DB with any identifying information
When pull Grid back up, read grid ordering from DB and apply the same order with setColumnOrder(columns)
So is there a better way to do this? I just checked the Directory, could not find anything obvious to make this easier. Just looking for how others have addressed this user requirement. If Vaadin 14 already supports such actions a little easier, that would be good to know as well, as it might give me some ideas on how to get that ability short term before I can upgrade to Vaadin 14.
For a more customizable grid you can (in addition to what you've already done) add a button that opens a dialog that lists all possible columnnames, together with a checkbox.
Unchecking the checkbox removes the column, checking the checkbox adds the column.
Even more comfortable is when the dialog lists all available columns in a Grid with draggable rows and editable checkboxes, so that the user can show, hide and sort all columns in one place. After that you have to reorder all columns by calling grid.setColumnOrder.
Just so people know how I solved this issue, based on the comments:
When load data into Grid, first check database for columns of this Grid/user combination. If find such a column order, call setColumnOrder(userColumns).
Added 2 buttons to top, one to save column order, one to reset it.
"Save" button only enabled after moving at least one column.
"Reset" button only enabled if at least one column was moved. One column was moved either because of the DB, or because user JUST moved a column.
On save, save to DB. On reset, clear from DB, and reset Grid to original column order.
We chose not to save the column order each time they changed the order, directly in the addColumnReorderListener, because we realized sometimes users might move columns around temporarily, and one really want to save that column order for the future. That said, the saving inside the addColumnReorderListener worked well.
We don't currently need to save the column sizes, as suggested by #Simon Martinelli, but we are keeping it as an idea for the future. I fully expect it would work.

When using QUERY, how can I make it so that data moves together when using filter?

I am creating a tool for a video game I play.
Link to the example spreadsheet (Please make a copy to edit so that this copy stays intact for additional helpers).
Sheet 1 is “Choose Owned”. It contains a list of all of the champions available in the game and includes their attributes.
Column A contains checkboxes. Checking a checkbox indicates that the user owns that champion, and brings it to Sheet 2.
Sheet 2 is called “Owned”. It contains a list of the champions checked off in “Choose Owned” (aka the champions the user owns). “Owned” includes the champion attributes too, as first seen in “Choose Owned”.
Beyond those same attributes, “Owned” contains 8 additional columns.
These columns are from Columns G:N and are labeled ‘Level’, ‘Rank’,
‘Ascension Lvl’, and ‘Team Label(s)’ (‘Team Label(s)’ takes up
columns J:N). This data is all unique information and requires the
user to input the information themselves depending on their
champions.
Because there are so many champions, I want the user to be able to use the Filter function in “Owned” so they can easily locate the champion they need or sort the table however they wish.
However, because I use the QUERY function to get the data from “Choose Owned”, the Filter function tends to break. The most obvious error comes when you try to sort A-Z or Z-A; this simply cannot be done. I was fine with this, and have even included a note at the top telling the user to avoid sorting alphabetically.
Everything else works correctly until the user tries to add a new champion from “Choose Owned”. When the champion is added to “Owned”, the additional, unique data in columns G:N go out of order because they don’t move with their original champions.
Example:
I choose my champions. These champions are copied to “Owned”.
I pick their relative data in columns G:N.
A few days later, I obtain new champions and check them off in “Choose Owned” so they are added to “Owned”. However, when I do this, the champions stay in the same order as they are in “Choose Owned”, and columns G:N do not move with their champions so now, that information is with the wrong champion.
I want the additional data (G:N) to move with their champions when the table is edited due to champions being added. Or, in other words, I want those columns to stay linked to the first columns.
If there is a different way to achieve all of this like if I have to use a function other than QUERY, that is fine!
Please share any solutions you may have. I would prefer to not use a script but will consider the idea if it works.
this is a common issue within Google Sheets and it's solvable in 2 ways:
either by introducing a common value (unique ID) and then linking the manual input to query and aligning it by ID
or easier approach in your case - using timestamp/linear ID so every new entry would be added to the bottom and then the query would be sorted based on this order.

Creating a totals page for timesheet

I have a spreadsheet that we use as a Time sheet.
It's made up of approx 80 tabs (Names of employees)
We have a front page, simply called "Totals"
This adds up a fortnights worth of hours into several Columns
When we make changes, we have several scripts to help make life easier
(Delete old sheets, duplicate master sheet, rename duplicate sheets, protect ranges etc...)
One script that we don't have though is one to create the totals page faster.
Our totals page has the name of every employee in column A,
We use these names in our scripts to rename tabs etc...
I would like a script to link the calculations on the Totals Page, to the sheet and cell of every individuals tab.
We do this by manually by entering =nameoftab!C47 in the cells of the totals page.
What i want to do is =Totals!A3 C47
So the cell pulls the sheet name from the name list on the left hand side, and points to C47 in the appropriate tab.
This would allow us to add new people to our time sheet by simply adding their name to column A and not the formulas for ordinary time/overtime/travel time/allowances etc...
Can this be done?
I have played with several formulas/scripts to make this easier but to no avail
(Please let me know if you need me to be more specific)
Try this simple formula:
=indirect("'nameoftab'!C47")
or in your case:
=indirect("'" & Totals!A3 & "'!C47")
where Totals!A3 is cell with sheet name.

Google Spreadsheets : how do i manage the automatic increment when extending formula to other cells?

I have, I hope at least, a very simple question.
I have a simple sheet with the 3 first columns being a table of results, and a bunch of options that I can fill in some columns on the right. Obviously, the values in the table are supposed to change when I change the different options.
The formulas are very simple : =B2+F9 (each value in the table is based on the previous entry, the first one being specified in the options.
When I select the cell, grab the little square on its bottom right and drag it down it generates something like this :
=B2+F9
=B3+F10
=B4+F11
=B5+F12
It's basically incrementing each reference... wich is the probem I face as the F9 reference is an option and should not change.
What I want basically is something like :
=B2+F9
=B3+F9
=B4+F9
=B5+F9
Thus incrementing the B column, but not the F9 cell.
I tried to "hard-write" some of the first cells, kind of telling him "keep this F9" but without any success :(
How am I supposed to do this ? :'(
Use absolute references for that. In your case, you'd have the following:
=B2+F$9
The $ symbol means that the row is absolute, and should not change when you extend the formula. So, it would generate:
=B2+F$9
=B3+F$9
=B4+F$9
...
If you want the column to be fixed, you can reference it like $B2, for example. And if both the column and the row must be fixed, you'd use $B$2 syntax.

How to keep one field fixed in a formular when using auto-fill?

I want to autofill a formula to a bunch of fields in one column. I can do that by filling two fields manually then select them and drag down.
I want column B's cells to be =D1*A1 , =D1*A2,... Note D1 should not change.
When I drag the fields down or use (Edit > Fill...) it changes D1 to D2, D3,... How can I keep one field fixed for autofill?
Holding ctrl button down does not help.
Any idea?
Make your "master" formula =D$1*A1. That flags the 1 in the D$1 part as being constant. You could also make the D part constant with =$D$1*A1, but since you stated this is a single column, it shouldn't matter in this case.
Note that this also works for Microsoft Excel, and I think that it's been a common feature of almost all spreadsheets since way back to supercalc on HDOS.
I just found another way (that is not easier than twalberg's, but worth mentioning)...
You can define a name (Insert > Names... Define). Select a field and give it a name. Then the name in your formulas.

Resources