# IF cell contains specific letter then return value

Options
✭✭
edited 06/22/23

I'd like to return a value of 120/208 in Service Volts for Xfmr# ending in E

value of 277/480 for Xfmr# ending in X

value of 120/240 for Xfmr# ending with no letter

Thanks

• ✭✭✭✭✭✭
Options

Hi @mromaire,

Try this!

=IF(RIGHT([xfmr#]@row, 1) = "X", "277/480", IF(RIGHT([xfmr#]@row, 1) = "E", "120/208", "120/240"))

Hope that helps!

BRgds,

-Ray

• ✭✭✭✭✭✭
Options

Hi @mromaire,

Try this!

=IF(RIGHT([xfmr#]@row, 1) = "X", "277/480", IF(RIGHT([xfmr#]@row, 1) = "E", "120/208", "120/240"))

Hope that helps!

BRgds,

-Ray

• ✭✭
Options

Thats it! Thanks Ray.

• ✭✭
Options

I forgot to add how would I exclude cells that are blank?

• ✭✭✭✭✭✭
Options

Hi @mromaire,

So glad it worked for you. To exclude the blanks, use this:

=IF(ISBLANK([xfmr#]@row), "", IF(RIGHT([xfmr#]@row, 1) = "X", "277/480", IF(RIGHT([xfmr#]@row, 1) = "E", "120/208", "120/240")))

BRgds,

-Ray

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!