Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. let
  2. name = [Name],
  3. name1 = Text.Replace(name, ",", ""),
  4. name2 = Text.Replace(name1, " - ", ""),
  5. name3 = if Text.Contains(name2, [Color]) then
  6. Text.Replace(name2, [Color], "")
  7. else name2,
  8. name4 = if [Size] <> null then
  9. Text.Start(name3, Text.Length(name3)-3) & Text.Replace(Text.End(name3, 3), [Size], "")
  10. else name3,
  11. name5 = if [Color] = null and [Size] = null then [Name]
  12. else Text.Trim(name4),
  13. name6 = if Text.Upper(Text.Start(name5, 3)) = Text.Start (name5, 3) and Text.Start(name5,1) = Text.Trim ([Class]) then
  14. Text.ReplaceRange(name5, 0, 3, "")
  15. else name5
  16. in
  17. name6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement