I have a long string containing the /OU part of a AD. This part is not always on the same place in the string. Does anyone knows how to extract this part and the following 4 characters?
Thanks for your quick answer, however when I try this I am getting an error messages that the matrix should be between 1 and the maximum value? Any idea?
What is the exact error message? I've never seen a reference to a matrix. Can the field be null? Can the number of characters after "/OU" sometimes be less than 3? Try the following:
if isnull({field}) or
ubound(split({field},"/OU")) < 2 or
Split({field}, "/OU")[2]) < 4 then
"Error" else
"/OU" & Left(Split({field}, "/OU")[2]), 4)
If this still doesn't work, you should provide samples of the field that include all variations.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.