# Formula to count the number of characters after a symbol

✭✭✭✭✭

Hello. I am attempting to write a formula that will count the number of characters that follow a "-", and use the resulting number to determine if the type should be a "PO" or a "SWA" using an IF statement.

I found a formula that will pull those characters following the "-", but it just gives me the actual 2 numbers following the dash, what I need to write the formula is:

IF (PO/SWA No@row) = 2 characters, "PO", otherwise "SWA"

Tags:

• ✭✭✭✭✭✭

Try this: =IF(LEN([PO / SWA No]@row)=2, "PO", "SWA"

For more on the LEN Function see:

• ✭✭✭✭✭

Hi @Mike Wilday , I tried that out but the formula returns the same Agreement Type every time, no matter the digits after the dash:

This is the formula I am using in row 1 that I have been attempting to modify to reach my desired end point: =RIGHT([PO / SWA No]@row, LEN([PO / SWA No]@row) - FIND("-", [PO / SWA No]@row))

• ✭✭✭✭✭

Great, that worked, thanks for your help!

• ✭✭✭✭✭✭