Forum Discussion
mdrammeh
Helper III
9 years agoConditional format for Alpha-numerical Columns
I have a column with alphanumerical values identifying the difference between INTERNAL versus EXTERNAL contact. A B MUST1234 EXTERNAL HAVENO INTERNAL NOHAV12 EXTERNAL ...
- 9 years ago
if List.ContainsAny(Text.ToList([A]), {"1","2","3","4","5","6","7","8","9","0"}) or [A] = "GLAMRO" then "EXTERNAL" else "INTERNAL"
mdrammeh
Helper III
9 years agoI must have missed something in the formula that it's returning an error. Also, the result only returned for "Internal" even though I had values that include a text in the description.
Vvelarde
Community Champion
9 years ago
Hi, just add a " " en each number
if List.ContainsAny(Text.ToList([TEXTFIELD]), {"1","2","3","4","5","6","7","8","9","0"}) then "EXTERNAL" else "INTERNAL"- mdrammeh9 years ago
Helper III
It worked perfect except the error message. The column with the values also had blank rows that was not being picked up by the formula. Is there a workaround?
- Vvelarde9 years ago
Community Champion
The formula works also with Blank Rows
I'll try first to made a Trim and Clean to the Column to delete other characters.
- mdrammeh9 years ago
Helper III
Sounds good. one more question. What if I want to create an exception to the rule by picking up a text description from the list.