Formula based off a selection

Hi All,


Could really use some help on trying to figure out a possible formula for the below:


There will be two options for freight provided, "COMPANY, and "eShipping". When "COMPANY" is selected the true cost will populate in our total cost column. When eShipping is selected I want cost *.10 to calculate in my total cost column. Any help would be greatly appreciated.



Tags:

Best Answer

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    Answer ✓

    @Jamie Hawkins So we're missing some info here.

    I am assuming the column containing the true cost value in the phrase "When "COMPANY" is selected the true cost will populate in our total cost column" is called True Cost.

    I am assuming that when you say "When eShipping is selected I want cost *.10 to calculate" that by cost you also mean the True Cost column value, but multiplied by .10, yes?

    In your screenshot, you have COMPANY inside quotes in the dropdown. This is how it appears in the sheet, right? That causes a parsing problem, so we can't just do a straight text comparison. We'll have to use CONTAINS.

    This formula goes in your Total Cost column.

    =IF(CONTAINS("COMPANY", [Freight Provider]@row), [True Cost]@row, IF([Freight Provider]@row = "eShipping", [True Cost]@row * .10))

    Regards,

    Jeff Reisman

    Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Answers

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭
    Answer ✓

    @Jamie Hawkins So we're missing some info here.

    I am assuming the column containing the true cost value in the phrase "When "COMPANY" is selected the true cost will populate in our total cost column" is called True Cost.

    I am assuming that when you say "When eShipping is selected I want cost *.10 to calculate" that by cost you also mean the True Cost column value, but multiplied by .10, yes?

    In your screenshot, you have COMPANY inside quotes in the dropdown. This is how it appears in the sheet, right? That causes a parsing problem, so we can't just do a straight text comparison. We'll have to use CONTAINS.

    This formula goes in your Total Cost column.

    =IF(CONTAINS("COMPANY", [Freight Provider]@row), [True Cost]@row, IF([Freight Provider]@row = "eShipping", [True Cost]@row * .10))

    Regards,

    Jeff Reisman

    Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!