A
A
Artem Morozov2019-12-19 17:17:43
excel
Artem Morozov, 2019-12-19 17:17:43

How to assign numeric values ​​in a list (drop-down list of a cell)?

In the previous question , I understood how to create a dropdown list.
And how to bind numeric values ​​to it?
So that for example
Yes = +1
No = -1
Probably = 0
That is, the idea is to make a kind of counter.
5dfb8650424a8895451731.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Shohruh Shaimardonov, 2019-12-19
@joeberetta

You will have to use the adjacent column.
There, write the following condition next to each cell:
IF (B1 = "Yes", 1; -1)
And to calculate the amount, simply use the formula SUM (C1: Cx) in the desired cell.
Ps instead of x is the number of the last line

K
Konstantin, 2019-12-19
@buhacker

A universal solution for lists of any size with any values.
1. In the column "K" put down the values ​​for the names of the elements of the list (in "K3" - 1, in "K4" - -1 in "K5" - 0)
2. In the column "C2" add a formula =ВПР(B2;$J$3:$K$5;2;ЛОЖЬ)and "stretch" it to end of the table. The meaning of the formula: we take the value of the neighboring cell (B2), look for it in column J, return the corresponding value from column K. "FALSE" means that we are looking for only an exact match, otherwise it will return anything.
3. Sum on column C
4. Column C can be hidden so that the eye is not an eyesore.
Thus, you can make the list as many elements as you like, and match them with any numerical values ​​​​(1,254, root (2), -0.123). Either not numeric, but then you don’t need to sum up column C either

I
idShura, 2019-12-19
@idShura

You can use the COUNTIF
function
upd
=СЧЁТЕСЛИ(A1:A5;"да")+(СЧЁТЕСЛИ(A1:A5;"нет")*-1)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question