获取值并根据条件将其转换为另一个值

Fetch for value and convert it to another according to condition

SHEET A - 起点

SHEET B - 目的地

到目前为止我尝试了什么:

a) 可以,但我无法将其放入数组中

=IF(COUNTIF(SHEETA!A2,"*Rejected*"),2,IF(COUNTIF(SHEETA!A2,"*Partially*"),3,IF(COUNTIF(SHEETA!A2,"Accepted*"),1,4)))

b) 一直在努力让它工作(简化版)但它不工作

=if((VLOOKUP(A2,A2:B2,2,FALSE))="Rejected*","2","1")

谁能帮帮我? 提前谢谢你

尝试第 2 行:

=INDEX(IFNA(VLOOKUP(A2:A, {SheetA!A2:A, IFNA(CHOOSE(MATCH(
 REGEXEXTRACT(SheetA!B2:B, "(?i)accepted|rejected|partially accepted"), 
 {"accepted", "rejected", "partially accepted"}, ), 1, 2, 3), 4)}, 2, )))