# Formula for returning specific value depending on cell criteria

Hello-

I'm trying to create a formula to populate a field with a fee amount based on the designated country group in another column. Essentially, I'm trying to say:

If country A, return \$125.00

If country B, return \$160.00

If country C, return \$125.00

If country D, return \$160.00

If Staff/Comp, return \$0.00

What I came up with below is not working. Any advice? Thanks in advance!

=IF(Group@row=COUNTRYA,"\$125.00"),IF(Group@row=COUNTRYB,\$160.00),IF(Group@row=COUNTRYC,\$125.00),IF(Group@row=COUNTRYD,\$160.00),IF(Group@row=STAFF/COMP,\$0.00)

• Change the column format to 'Currency'

• Below is the proper syntax:

=IF(Group@row = "COUNTRYA", 125, IF(Group@row = "COUNTRYB", 160, IF(Group@row = "COUNTRYC", 125, IF(Group@row = "COUNTRYD", 160, IF(Group@row = "STAFF/COMP", 0, 0)))))

• Hi Leibel-

Thanks for the quick response! I just tried the formula, which does fix the initial issue- thank you! I am wondering though- Is it possible to obtain the returned value in a \$0.00 format? I tried adjusting your formula, replacing the "125" value with a dollar/decimal representation of the value (e.g. \$125.00), but it broke the formula. Any suggestions on how to adjust this to get the desired output?

• Change the column format to 'Currency'

• Great! Thanks so much!

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!