Hi - I am trying to get the MC out of a field under the condition that the field has the word "CODE" in it. I am trying to use the substring formula but it's not giving me what I want.
OD CODE: MC C
this is what I am attempting to use:
If Contains([Daily Count],"CODE")
then
Substring([Daily Count],8,9)
else
Null()
endif
Solved! Go to Solution.
Hi @jenner85,
If you want to receive only MC the formula should look like this:
If Contains([Daily Count],"CODE")
then
Substring([Daily Count],9,2)
else
Null()
endif
Hi @jenner85 — Also, try this solution... the same results you can achieve using RegEx expression:
//Method- if "MC" or anything else is available upto 2 length
If Contains([Daily Count],"CODE") Then
REGEX_Replace([Daily Count], ".*:\s(..).*", "$1")
Else
Null()
endif
If it resolves your query please mark it "Solved" or "Solved" with a Like. This will help other users find the same answer/resolution. Thank you.