Forum Discussion
SamCole
6 years agoQrew Cadet
Played around with some ideas from other discussions, and came up with this:
List(", ",
If(Begins(Part([SN_List], 2, "U"), "L"), "U" & Left(Part([SN_List], 2, "U"), 5)),
If(Begins(Part([SN_List], 3, "U"), "L"), "U" & Left(Part([SN_List], 3, "U"), 5)),
If(Begins(Part([SN_List], 4, "U"), "L"), "U" & Left(Part([SN_List], 4, "U"), 5)),
If(Begins(Part([SN_List], 5, "U"), "L"), "U" & Left(Part([SN_List], 5, "U"), 5)),
If(Begins(Part([SN_List], 6, "U"), "L"), "U" & Left(Part([SN_List], 6, "U"), 5)),
If(Begins(Part([SN_List], 7, "U"), "L"), "U" & Left(Part([SN_List], 7, "U"), 5)),
If(Begins(Part([SN_List], 8, "U"), "L"), "U" & Left(Part([SN_List], 8, "U"), 5))
))
It returns exactly what I'm looking for from the original post. But this formula assumes:
1) There will not be more than a set number of serial #s, or I'd have to add more If statements
2) The serial #s that i'm parsing will always be the same length of 6 characters ("U" plus the 5 characters after it)
wondering if there's a more elegant way that doesn't rely on those assumptions..
------------------------------
Sam Cole
------------------------------
List(", ",
If(Begins(Part([SN_List], 2, "U"), "L"), "U" & Left(Part([SN_List], 2, "U"), 5)),
If(Begins(Part([SN_List], 3, "U"), "L"), "U" & Left(Part([SN_List], 3, "U"), 5)),
If(Begins(Part([SN_List], 4, "U"), "L"), "U" & Left(Part([SN_List], 4, "U"), 5)),
If(Begins(Part([SN_List], 5, "U"), "L"), "U" & Left(Part([SN_List], 5, "U"), 5)),
If(Begins(Part([SN_List], 6, "U"), "L"), "U" & Left(Part([SN_List], 6, "U"), 5)),
If(Begins(Part([SN_List], 7, "U"), "L"), "U" & Left(Part([SN_List], 7, "U"), 5)),
If(Begins(Part([SN_List], 8, "U"), "L"), "U" & Left(Part([SN_List], 8, "U"), 5))
))
It returns exactly what I'm looking for from the original post. But this formula assumes:
1) There will not be more than a set number of serial #s, or I'd have to add more If statements
2) The serial #s that i'm parsing will always be the same length of 6 characters ("U" plus the 5 characters after it)
wondering if there's a more elegant way that doesn't rely on those assumptions..
------------------------------
Sam Cole
------------------------------