Excel: If my cell ends with GE or DG

Solved
BILLING Posted messages 162 Registration date   Status Member Last intervention   -  
BILLING Posted messages 162 Registration date   Status Member Last intervention   -
Hello,

In Excel 2010:
I want my formula to determine if cell S2 (for example) ends with GE or DG, so that it can then perform another command that I haven't determined yet. I don't know how to write the syntax to check if the last two letters are GE or DG.

Thank you,

Configuration: Windows 7 / Internet Explorer 7.0

2 answers

  1. chossette9 Posted messages 6855 Registration date   Status Contributor Last intervention   1 313
     
    Hello,

    =IF(OR(RIGHT(S2,2)="GE",RIGHT(S2,2)="DG"),true_value,false_value)

    should suit you.

    Best regards.
    --
    This guy wasn't the brightest, as he was foolish.
    10
  2. BILLING Posted messages 162 Registration date   Status Member Last intervention   48
     
    Hello,

    Yes, it works perfectly.

    Thank you :-)
    0