Y
Yuanhang
It took me 2 hours to write a logical formula, but I still could make it.
Basically, I want to make the program choose different cells from a few
columns to input into a new column depending on different situations.
Let's say, we have such columns as follows:
A B C D
4 0 20 #N/A
6 0 16 #N/A
8 1 9 1
10 0 9 #N/A
15 2 8 2
20 5 5 5
30 7 6 6.5
50 10 3 3
55 13 0 #N/A
60 15 2 2
65 16 0 #N/A
71 22 0 #N/A
First, I need to compare the values in column A with a constant number 30.
①If it’s greater than 30, I should input the value in column B with the same
row into column D; ②if it’s less than 30, rather than choose data from column
B, I input the value in column C into column D; â‘¢if it equals to 30, I have
to use the average value of column B and C as the input into column D.
So basically, there are three different situations. However we’ve got some
constraints here. ④If the value in either column B or C is zero, don’t input
any number into column D or show up as an error. ⑤After encountering two
consecutive zero, don’t select any other values.
Now you may know which logical formula's killing me. Please help me out.
Basically, I want to make the program choose different cells from a few
columns to input into a new column depending on different situations.
Let's say, we have such columns as follows:
A B C D
4 0 20 #N/A
6 0 16 #N/A
8 1 9 1
10 0 9 #N/A
15 2 8 2
20 5 5 5
30 7 6 6.5
50 10 3 3
55 13 0 #N/A
60 15 2 2
65 16 0 #N/A
71 22 0 #N/A
First, I need to compare the values in column A with a constant number 30.
①If it’s greater than 30, I should input the value in column B with the same
row into column D; ②if it’s less than 30, rather than choose data from column
B, I input the value in column C into column D; â‘¢if it equals to 30, I have
to use the average value of column B and C as the input into column D.
So basically, there are three different situations. However we’ve got some
constraints here. ④If the value in either column B or C is zero, don’t input
any number into column D or show up as an error. ⑤After encountering two
consecutive zero, don’t select any other values.
Now you may know which logical formula's killing me. Please help me out.