我想在这个IF语句中使用OR。例如IF cell="2"
或IF cell="4"
或IF cell="hello"
。
你能帮助我吗?在当前代码中,我只有一个IF cell="2"
。
Cell.FormulaR1C1 = "=IF(left(RC[2],1)=""2"",""delete"",""1"")"
答案 0 :(得分:1)
试试这个(未经测试但希望能够奏效):
Cell.FormulaR1C1 = "=IF(OR(left(RC[2],1)=""2"",left(RC[2],1)=""4"",left(RC[2],1)=""hello""),""delete"",""1"")"