[英]How can I correctly use the if(and()) function so that I can then drag it down alongside a column of numbers? (Google Sheets)
I use Google Sheets and I have tried to get this formula right for a while now but it always gives me "Undefined" for every cell I drag down to along a column of data.我使用 Google 表格,一段时间以来我一直试图让这个公式正确,但对于我沿着一列数据向下拖动的每个单元格,它总是给我“未定义”。
If you're curious, this is for stocks' Relative Strength Index (RSI) – buying & selling rates.如果您好奇的话,这是股票的相对强弱指数 (RSI) – 买入和卖出率。
Some number examples (down a column, starting with A1) are as follows:一些数字示例(向下一列,从 A1 开始)如下:
How can I readjust this so that the following formula works?我怎样才能重新调整它以便下面的公式起作用? It goes down column B alongside column A (where the data is)!它沿着 B 列与 A 列(数据所在的位置)一起向下移动!
=IF(AND(0<=$A1,$A1<20),"Risky",
IF(AND(20<=$A1,$A1<40),"Oversold",
IF(AND(40<=$A1,$A1<60),"Neutral",
IF(AND(60<=$A1,$A1<80),"Overbought",
IF(AND(80<=$A1,$A1<=100),"Too Risky","Undefined")))))
delete everything in your column and use in row 1:删除列中的所有内容并在第 1 行中使用:
=INDEX(IFNA(VLOOKUP(A1:A,
{0, "Risky";
20, "Oversold";
40, "Neutral";
60, "Overbought";
80, "Too Risky";
101, "Undefined"}, 2, 1)))
=INDEX(IF(A2:A="",,IFNA(VLOOKUP(B2:B*1,
{0, "Risky";
20, "Oversold";
40, "Neutral";
60, "Overbought";
80, "Too Risky";
101, "Undefined"}, 2, 1))))
also see: https://webapps.stackexchange.com/q/123729/186471另见: https://webapps.stackexchange.com/q/123729/186471
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.