I'm trying to create a formula to generate a list of values in a dropdown.
- Each row contains a
task
that has astatus
, and apriority
. - The
priority
is set from a dropdown containing a list of numbers from1-50
. - No two
tasks
can share the samepriority
so the dropdown must exclude any already in use. - When a
task
has astatus="done"
, itspriority
is no longer considered in use and should once more be available in the dropdowns.
For example, in the table below,
- the dropdowns are in column A
- The priority
15
inA4
should not be excluded from dropdowns becauseC4="Done"
- Therefore, the dropdown in
A6
, for example, could include15
but would not include any of{24, 32, 49}
A | B | C | |
---|---|---|---|
1 | Priority | Task | Status |
2 | 32 | A task to complete | In Progress |
3 | 24 | Another task | In progress |
4 | 15 |
A completed task | Done |
5 | 49 | A postponed task | On Hold |
6 | Another task awaiting prioritisation | To Do |
I'm able to eliminate any assigned priority
from the dropdowns using the following formula, but I can't get to the next step, restoring used values to the dropdown if they are assigned to a task
with status="done"
:
=ARRAYFORMULA(
IF(
COUNTIF(
H2:H1000,A2:A1000)=0,
H2:H1000,))
How would I reinstate a value that was used, such as in A4
of my example, if the status
of that row is set to "Done"
?