Share via

issues with IF function

Anonymous
2025-05-08T13:56:42+00:00

Hello!

I am using the IF function to create information in a cell by pulling the last two characters from a different cell. I have the formula, but I can't figure out what the error is. When I enter it as is below it errors out.

=LET(s, RIGHT(E1, 2), IF(s={"Ch","CR","MC","PA","Wi","Ec"}), "REVENUE ADJUSTMENT", IF(OR(s={"In","Se"}), "NON CASH RECEIPT"))))

https://learn-attachment.microsoft.com/api/attachments/71edaf6f-0b84-4cdd-b791-2ffd98d4ced8?platform=QnA"https://learn-attachment.microsoft.com/api/attachments/a501f373-23c6-4f6f-b3bc-432df8ca163e?platform=QnA" rel="ugc nofollow">https://learn-attachment.microsoft.com/api/attachments/a501f373-23c6-4f6f-b3bc-432df8ca163e?platform=QnA

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2025-05-08T14:04:57+00:00

One way, out of many:

=LET(s, RIGHT(E1, 2), IF(ISNUMBER(SEARCH(s,"ChCRMCPAWiEc")), "REVENUE ADJUSTMENT", IF(OR(s="In",s="Se"), "NON CASH RECEIPT","NA")))

or maybe just

=IF(ISNUMBER(SEARCH(RIGHT(E1, 2),"ChCRMCPAWiEc")), "REVENUE ADJUSTMENT", "NON CASH RECEIPT")

or

=IF(OR(RIGHT(E1, 2)="In",RIGHT(E1, 2)="Se"), "NON CASH RECEIPT", "REVENUE ADJUSTMENT")

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful