Need formula to return value if first few digits are a specific value

Meredith Krueger
Meredith Krueger โœญโœญโœญโœญ
Screenshot 2025-03-14 at 14.01.30.png Screenshot 2025-03-14 at 14.05.14.png

I tried the above formula but it does not recognize the first numerical digits. I tried "ISNUMBER" but it also does not work because there is a dash in the code. I only want it to look at the #'s in front of the dash. Depending on the first part of the "Item #", it will determine the "Printing Plant".

Answers

  • VBAGuru
    VBAGuru โœญโœญโœญโœญโœญโœญ

    This will work for what you have. If you are going to be going for more regions I would suggest using a separate table that lists out each one with the prefix, Then using Index/Match. This nested IF statement is going to get exponentially large for each added region.

    =IF(LEFT([MCC Item #]@row, 3) = "104", "LAF", IF(LEFT([MCC Item #]@row, 3) = "105", "HUM", IF(LEFT([MCC Item #]@row, 2) = "21", "YOR", "")))

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!