我有一个不同阶段的列,如Primary,Secondary,Deem Primary,Deem Secondary。我想创建另一个列,它将使用公式将Primary和Deem primary视为“Primary”,将Deem Secondary和Secondary视为“Secondary”。下面是我试图用公式
实现的例子Column Phase New Column should show data of column phase as
Deem Primary Primary
Primary Primary
Primary Primary
Deem Primary Primary
Secondary Secondary
Deem Secondary Secondary
答案 0 :(得分:1)
尝试开关:
=SWITCH(A2, "Deem Primary", "Primary", "Deem Secondary", "Secondary", A2)
将“Deem Primary”替换为“Primary”,将“Deem Secondary”替换为“Secondary”,否则返回原始值。
答案 1 :(得分:0)
假设您的列 A ,并且数据开始的行是 2 :
=IF(ISNUMBER(SEARCH(A2,"Primary")),"Primary",IF(ISNUMBER(SEARCH(A2,"Secondary")),"Secondary", ""))
假设您的New Column
B :在 B2 中复制上述公式,然后将其复制
注意:公式不适合列 A
中没有值的行