If Statements based on column status

Melanie Sanders
Melanie Sanders ✭✭✭✭✭
edited 10/29/24 in Formulas and Functions

Hi, I have another IF statement I am trying to work. Please see below. I am wanting to change the Date License Will Be Requested column based on what is in the RML STATUS column.

If the RML STATUS column is IN TRL-CURRENT then I would like the Date License Will Be Requested column to be Order Dispense Date column -20 days or

If the RML STATUS column is RML-CURRENT then I want the Date License Will Be Requested column to be RML EXP DATE column -20 days. I can't quite figure it out. Your help is appreciated.

Best Answer

  • Ward.Hively
    Ward.Hively ✭✭✭✭
    Answer ✓

    Hi Melanie,

    Based on your description and the image provided, you're looking to set up an IF statement to calculate the "Date License Will Be Requested" column based on the value in the "RML STATUS" column.

    Here’s how you can structure the logic for the IF statement:

    • If the "RML STATUS" is "IN TRL-CURRENT", the "Date License Will Be Requested" should be 20 days before the "Order Dispense Date".
    • If the "RML STATUS" is "RML-CURRENT", the "Date License Will Be Requested" should be 20 days before the "RML EXP DATE".

    In Excel or Google Sheets, the formula might look something like this:

    =IF([RML STATUS]@row = "IN TRL-CURRENT", [Order Dispense Date]@row - 20, IF([RML STATUS]@row = "RML-CURRENT", [RML EXP DATE]@row - 20, ""))

    • If the "RML STATUS" is "RML-CURRENT", it subtracts 20 days from the "RML EXP DATE".
    • If neither condition is met, it returns an empty string.

    Let me know if you need further assistance!

    CEO | Skyway Consulting Co.

    Does your Dashboard need a map that updates from Smartsheet Data?

    We pioneered 101+ ways to add a map to a Smartsheet Dashboard.

    Smartsheet and GIS Integrations

    Explore Smartsheet Maps (ArcGIS)

    LinkedIn

Answers

  • Ward.Hively
    Ward.Hively ✭✭✭✭
    Answer ✓

    Hi Melanie,

    Based on your description and the image provided, you're looking to set up an IF statement to calculate the "Date License Will Be Requested" column based on the value in the "RML STATUS" column.

    Here’s how you can structure the logic for the IF statement:

    • If the "RML STATUS" is "IN TRL-CURRENT", the "Date License Will Be Requested" should be 20 days before the "Order Dispense Date".
    • If the "RML STATUS" is "RML-CURRENT", the "Date License Will Be Requested" should be 20 days before the "RML EXP DATE".

    In Excel or Google Sheets, the formula might look something like this:

    =IF([RML STATUS]@row = "IN TRL-CURRENT", [Order Dispense Date]@row - 20, IF([RML STATUS]@row = "RML-CURRENT", [RML EXP DATE]@row - 20, ""))

    • If the "RML STATUS" is "RML-CURRENT", it subtracts 20 days from the "RML EXP DATE".
    • If neither condition is met, it returns an empty string.

    Let me know if you need further assistance!

    CEO | Skyway Consulting Co.

    Does your Dashboard need a map that updates from Smartsheet Data?

    We pioneered 101+ ways to add a map to a Smartsheet Dashboard.

    Smartsheet and GIS Integrations

    Explore Smartsheet Maps (ArcGIS)

    LinkedIn

  • Melanie Sanders
    Melanie Sanders ✭✭✭✭✭
  • Ward.Hively
    Ward.Hively ✭✭✭✭

    Happy to help!

    You might have noticed, based on the reference to Google Sheets, that I used AI to generate the response. If so, you would be correct.

    There is no better way to solve embedded IF functions than ChatGPT. They are a necessary inconvenience, but GPT does phenomenally well sorting out this type of logic.

    The question you posted is a perfectly fine prompt to generate the response given.

    Good luck in your business and Smartsheet journey!

    CEO | Skyway Consulting Co.

    Does your Dashboard need a map that updates from Smartsheet Data?

    We pioneered 101+ ways to add a map to a Smartsheet Dashboard.

    Smartsheet and GIS Integrations

    Explore Smartsheet Maps (ArcGIS)

    LinkedIn

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!