简体   繁体   English

在A,B,C,D列中插入X或Y

[英]Insert X or Y for Column A, B, C, D

What I need is an X placed if the start range (A1:A) equals range (E1:K1) until range (B1:B). 如果起始范围(A1:A)等于范围(E1:K1)直到范围(B1:B),我需要的是放置X。 Then the same for C and D in the same row. 然后对于同一行中的C和D相同。 So Y should take place of X if true. 因此,如果为true,则Y应该代替X。 What I have tried is =IF(AND($A1<=E$1,$B1>=E$1),"X","") but I cant seem to get it to work for both sets. 我试过的是=IF(AND($A1<=E$1,$B1>=E$1),"X","")但我似乎无法使它同时适用于两组。 在此处输入图片说明

Here is the formula I put in as per the requirement. 这是我根据要求输入的公式。
The trick was that I split it into two IF function calls one inside the other, there by allowing opportunity for our third value of "". 诀窍是我将其分成两个IF函数,一个在另一个内部,通过允许我们使用第三个值“”来实现。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM