Formula to make dropdown menu choice follow specific text? - google-sheets

I made a task tracker which takes my tasks from the main group Google Spreadsheet and arranges them in order in my tracker spreadsheet by date. I also included a dropdown list to mark the status of each task.
It's all working the way I hoped it would except for the status option - the data from the group spreadsheet changes frequently (tasks are removed and added) and when this happens, the list in my spreadsheet gets automatically updated and get shifted around based on the new tasks and dates, but the status column remains static.
For example, say I finish the first task on my spreadsheet so I mark the task on the first row of my tracker spreadsheet "done". Our group admin sees my work is finished and deletes said task from the group spreadsheet, so my tracker spreadsheet automatically gets updated and the first task is also removed from my spreadsheet.
However, the next task gets bumped to the top row of my spreadsheet, which is still marked "done" - I was hoping the status would get deleted as well or the dropdown menu is reverted to its blank initial state.
Is there a way to make the dropdown option register/remember which data or text were in its row (when it was chosen) and follow it when the tasks and schedules get updated? I was thinking the trigger could be when a cell in the status column gets filled in (by way of choosing an option from the dropdown menu), it remembers the data from the four cells to its left, then tracks it even when the list of tasks get shifted around.

I've tried to put together an update to your sheet that may do what you want. Look at my sample sheet. Since several small changes were needed on different tabs, I didn't want to affect your sample.
The key point is having a unique identifier for each task. Lots of ways of doing this. I added the sheet name, eg tasks1, or tasks2 to the Task#. This would need to be done in the sheets that you pull your tasks from, eg. tasks1, tasks2, and tasks3.
The Tracker tab lists all of your tasks, pulled from those sheets. I've added a hidden column (E) for the Task ID, but it doesn't have to be hidden. And possibly you don't need to show the Task#, if it is obvious from the Task ID value.
To enter status updates, you must only do that on the UpdateStatus tab. Here you will need to maintain a list of task IDs in some way. New Task IDs could be added to this list manually, when you get assigned a new task. Or a macro/script could be used to add new Task IDs.
You could even pre-define all possible task IDs for your company, and, using filtering, only show the ones for which you have an assigned task.
See tab UpdateStatus#2 for an example of this. This would depend on a good naming convention for your TaskID values.
Let me know if this makes sense to you or not, or if you have any questions. The only necessary formulas are a few VLOOKUPs to pull data from other locations, based solely on the Task ID value for that row. Formula cells are hightlighted in yellow.

Related

Alternative to "ArrayFormula" in GoogleSheets

I have been trying to create a production scheduler in google sheets.
Each tab is for a different department to fill out.
Ideally, one person enters the Order summary in the first tab. The next tab gets updated and someone else fills in the relevant details and it goes to the final tab.
Is there a way to automatically add rows to other tabs while having the ability to sort?
I have been using =arrayformula() initially but I realise the if I try sorting in other tabs, it messes up that sheet. I also tried =sheet1!A1, but I want to restrict as much input by other members.
sort it by formula. example:
=ARRAYFORMULA(SORT(A2:C; 2; (D1="asc")*1))
where D1 is a dropdown with asc,desc and we sort the whole array via B (2nd) column

Google Sheets - Have working Tabs retain the entered information

I have a sheet that multiple people are working on, but only on certain rows in the sheet that they mark with their name. There is a master sheet where they are marking which ones they're working on, then a tab for each named person. The tab with their name gets populated using a "=QUERY(Master!A3:AX,"select * Where L='NAME'")". The goal of the tab is so they can work on their own stuff without having to scroll through the thousands of rows to find their next entry. Getting the info from the master to the tab is working fine, but when they are working on their tab, they add information to a few new columns at the end of the query. This is where my problem lies, when they go and tag another entry on the master as theirs, the columns they added information to already do not move with the entrys, they just get pushed up or down depending on the new entry placement.
Is there something I can do that will still pull in the data from the master sheet to the corresponding tab, but then keep what the staff is actually entering/working on, to remain in line with the entry that got pulled in? The whole process is sort of useless if their work is not retained as they are working through it.
For example, the query pulls in column A-L, then they are adding information to column M and N for the management to read and make decisions off of their input. I need the information they enter into column M and N to remain with the row the query originally pulled in. The master is sorted by a unique number in column A that needs to remain in that order, so they may add new entries randomly as they assign rows to themselves.

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.

Find a value in an array and return a range result - GSheets

Introduction
I am managing an event where I have volunteers to assign to some tasks over a few days.
Here is the link to a simplified version of my sheet: https://docs.google.com/spreadsheets/d/18_zRRmmT85pWc9rW8oS619YiTnxMzEEdJAS9Ayut4RQ/edit?usp=sharing
I need two views to gently handle the event:
Full volunteers list, with assigned tasks, in order to ensure that each of them are assigned a task and to inform them about their assigned task when they arrive at the event (refer to the Volunteers tab),
Tasks planning, with associated volunteers so I can keep track of the presence of the volunteers at the time they should be working (refer to the Activity X tabs)
Problem
Now I will manually fill in the activity tabs with my volunteers and I need to have the Assignation (expected) column in Volunteers tab filled automatically (see the provided examples).
Hence the title: I need to find, in each Activity tab, the name of the assigned volunteers (value) and to retrieve which tasks with date and hour he has been assigned to (range result).
Constrains
The Volunteers tab already exists and is used for several purposes. Therefore it cannot be fully generated from the other tabs, only the Assignation column must be filled automatically,
A single volunteer can have several assignation for the same activity (as long as it is not on the same time slot, so he will not appear twice in the same column),
A single volunteer can have several assignations through several activities,
Volunteers list in Activity X tabs would be hard to keep sorted as we fill the planning
Approaches already tried
LOOKUP family functions
LOOKUP: works only with sorted values, which is merely impossible to maintain by hand as we fill the tables.
HLOOKUP: According to the documentation and admitting we cheat a bit in incorporating the recap in the range, it provides the expected result but only for the first row of the range:
=HLOOKUP(A2, act1_volunteers,ROWS(act1_volunteers), FALSE)
VLOOKUP: Would not allow to retrieve the summary rows that I need to display on first tab.
HLOOKUP in ARRAYFORMULA
I have hoped that function would let me perform a kind of for each row in range action, but it provides the same result of the previous approach.
=ARRAYFORMULA(HLOOKUP(A2, act1_volunteers,ROWS(act1_volunteers), FALSE))
INDEX & MATCH
MATCH applies only on 1-dimension (either a row or a column, but not a range), and cannot be applied with ARRAYFORMULA to extend.
I have come to an end about my ideas, I was quite surprised to struggle to find such a function. I really feel the expected views are needed for the different managers of the event, but I could envisage to reform the tables if that could ease the process.
You can try this formula below:
=TEXTJOIN(" / ", TRUE, FILTER(SPLIT('Activity 2'!$L$4, "|"), IF(REGEXMATCH(SPLIT('Activity 2'!$L$4, "|"), A2)=TRUE, "TRUE")))
Use this to match your name to the concatenated task list. You should paste this on the first cell and later drag it down the column.
A new sheet has been created and this is how the end result looks like:
Reference
TEXTJOIN;
FILTER;
SPLIT;
IF;
REGEXMATCH.

Automatically updating Data Validation lists based on user input

I have a very large data set (about 16k rows). I have 10 higher level blocks and within each block I have 4 categories (10 rows for each) which use Data Validation lists to show items available in each category. The lists should automatically update based on user input. What I need your help with is that I want to use the same data set for each block and preferably a least calculation/size intensive approach. I have put together a sample file that outlines the issue with examples.
Sample File
Thank you for your help in advance.
Okay, I've found something, but it can be quite time consuming to do.
Select each range of cells. For instance, for the first one, select B3:B18 and right click on the selection. Find 'Name a Range..." and give it the name "_FIN_CNY". Repeat for all the other ranges, changing the name where necessary.
Select the first range of cells to get the data validation, and click on "Data validation", pick the option "Allow: List" (you already have it) and then in the source, put the formula:
=INDIRECT($G$4&"_CNY")
$G$4 is where the user will input. This changes as you change blocks.
_CNY is the category. Change it to _CNY2 for the second category.
Click "OK" and this should be it. Repeat for the other categories.
I have put an updated file on dropbox where you can see I already did it for the data of _FIN for categories CNY, CNY2 and INT and did the one for _GER as well. You'll notice the category of INT for _GER doesn't work, that's because the Named Range _GER_INT doesn't exist yet.

Resources