问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/64993254/formula-to-make-dropdown-menu-choice-follow-specific-text