目前的公式是
=IF(AND(RIGHT(A3,2)="00",B3="Vinyl",H3="No",I3="01 - UMGI",G3="Catalogue"),"8M Block required","None")
我想输入B3
的是Vinyl
如果B3
=LP
或2LP
或3LP
或4LP
或EP
或V10
或V12
或V7
Vinyl Box
但陷入混乱
答案1
您可以实施或修改现有公式,方法如下:
{"LP","2LP","3LP","4LP","EP","V10","V12","V7","Vinyl Box"}
因为这些是您想要应用于 Cell 的多个条件 --> B3
,如果它等于任何值,则使用OR()
Function 并且可以通过以下某些方式应用它:
•选项一:
在名称管理器中定义为ListOfConditions
转到Formulas
选项卡 --> 单击Name Manager
--> 单击New
--> Name
(ListOfConditions
可以根据自己的选择命名) --> Scope
--> Workbook
--> Refers To:
--> 粘贴以下内容: --> 按OK
={"LP","2LP","3LP","4LP","EP","V10","V12","V7","Vinyl Box"}
• 公式可用作:
=IF(AND(RIGHT(A3,2)="00",OR(B3=ListOfConditions),H3="No",I3="01 - UMGI",G3="Catalogue"),"8M Block required","None")
•选项二:
将以下列表粘贴到同一工作表或同一工作簿中的另一个工作表中的某个空白列中,也可以隐藏该工作表,在此示例中,我已将其粘贴到Column S
应用公式的同一工作表中。并用作
={"LP";"2LP";"3LP";"4LP";"EP";"V10";"V12";"V7";"Vinyl Box"}
• 公式可用作:
=IF(AND(RIGHT(A4,2)="00",OR(B4=S3#),H4="No",I4="01 - UMGI",G4="Catalogue"),"8M Block required","None")
•选项三:
或者在现有公式中使用整个列表,如下所示:
=IF(
AND(
RIGHT(
A4,2
) = "00" ,OR(
B4 =
{ "LP", "2LP", "3LP", "4LP", "EP", "V10", "V12", "V7", "Vinyl Box"}
) ,H4 = "No" ,I4 = "01 - UMGI" ,G4 = "Catalogue"
), "8M Block required", "None"
)
以下是以上所有内容的屏幕截图: