If Product ID # can be changed to a Single Line Text that will solve the issue with dropping the leading 0.
Then if({Product ID #}=0...) can become if(LEFT({PRODUCT ID #}, 1)="0"...)
If Product ID # can be changed to a Single Line Text that will solve the issue with dropping the leading 0.
Then if({Product ID #}=0...) can become if(LEFT({PRODUCT ID #}, 1)="0"...)
Is there a way to extract just one number from a string of numbers without doing it manually?
I don't understand the question, or at least the specifics of it.
What I suggested would return the first character in the string.
If you're looking for the character at a specific position I would use a combination a of LEFT() and RIGHT() - RIGHT(LEFT({field name}, 4),1) should give you the character in the 4th position, but if 10 people respond they could probably give you 10 different variations.
FIND() and SEARCH() can tell you if a specific character occurs in a string, and SEARCH() returns the location.
For example, this formula could be.
In this formula, the product ID needs to be String field.
SWITCH(LEFT({Product ID #},1),
"0", "A",
"1", "B",
"2", "C",
BLANK()
)
For example, this formula could be.
In this formula, the product ID needs to be String field.
SWITCH(LEFT({Product ID #},1),
"0", "A",
"1", "B",
"2", "C",
BLANK()
)
What is the point of having the Blank() in here?
SWITCH(expression, [pattern, result ... , default])
The last argument is an optional default value that is not necessarily needed.
For example, you could put an error message here.