Looking for a formula to compare two columns, and enter true or false in a third column

Joe Busch
Joe Busch ✭✭✭
edited 10/18/22 in Formulas and Functions

The two columns will each have an 8 character string, want the formula in a third column to put True or False into the cell.

Thanks in advance,

Joe Busch

Best Answer

Answers

  • Michael Culley
    Michael Culley ✭✭✭✭✭

    So you want the 3rd column to say true if both columns are 8 characters and false if they are not both 8 characters?

    If so, that would be:

    =IF(AND(LEN([First Column]@row) = 8, LEN([Second Column]@row) = 8), "True", "False")

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭

    Hi @Joe Busch

    I hope you're well and safe!

    Try something like this.

    =IF([Column One]@row <> "", IF([Column One]@row = [Column Two]@row, "True", "False"))

    Did that work/help?

    I hope that helps!

    Be safe, and have a fantastic week!

    Best,

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up, Awesome, or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

  • Joe Busch
    Joe Busch ✭✭✭

    Hello Andree and Michael!

    Thanks for your quick responses. The first column is a security code entered on a form by a reviewer, that needs to match the second column, which contains the special code sent to them. When the columns match the review is uploaded and the Accounts Payable is forwarded their w9 and ACH form to process a payment. Andree's formula is working, I was trying to use the HAS option and was going nowhere.

    This formula saves having to make someone manually look at the process to make it happen.

    I got lots of good ideas for this process at Engage and this was, hopefully, the last piece of the puzzle.

    Smartsheet community ROCKS!

    Joe Busch

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    Answer ✓

    @Joe Busch

    Excellent!

    Happy to help!

    Please support the Community by marking the post(s) that helped or answered your question or solved your problem with the accepted answer/helpful, Insightful/Vote Up/Awesome. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!