Nested if & countifs to generate a prefix based on number of occurrences

Options

I am trying to get this part of a concatenate to work but keep getting #unparseable. The latter part of the concatenate works and generates a unique identifier for the project. However, the beginning section is meant to generate a prefix based on whether this project is the first, second (b), third (c) etc. project with the same lead person. The concatenate works in sheets but when transferring to Smartsheets no longer works. Below is this beginning prefix part, any help with finding the problem would be great!

=IF(COUNTIFS(($[Supervisor forename]$1:[Supervisor forename]@row),[Supervisor forename]@row,($[Supervisor surname]$1:[Supervisor surname]@row),[Supervisor surname]@row)>1,CHAR(96)+COUNTIFS(($[Supervisor forename]$1:[Supervisor forename]@row),[Supervisor forename]@row,($[Supervisor surname]$1:[Supervisor surname]@row),[Supervisor surname]@row)-COUNTIF(($[Supervisor forename]$1:[Supervisor forename]@row)&([Supervisor forename]$1:[Supervisor forename]@row),([Supervisor forename]@row&[Supervisor surname]@row)),””)


The original google sheets part of the concatenate is:

=CONCATENATE( IF(COUNTIFS($C$2:C2, C2, $D$2:D2, D2) > 1, CHAR(96 + COUNTIFS($C$2:C2, C2, $D$2:D2, D2) - COUNTIF($C$2:C2&C$2:C2, C2&D2)), "")...

Best Answer

  • Ramzi
    Ramzi ✭✭✭✭✭
    Answer ✓
    Options

    Smartsheet uses "+" (Plus sign) for concatenation and not "&" like Sheets and Excel do

    Replace & with + and you should be good to go.

    Smartsheet Solutions Architect

    www.adapture.com

«1

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!