Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Original Post: https://www.reddit.com/r/excel/comments/7sh5cn/power_query_to_create_custom_column_which_assigns/
- Created By: Alex Powers
- Website: http://www.itsnotaboutthecell.com
- Contact: [email protected]
- */
- let
- Source = Excel.CurrentWorkbook(){[Name="SupervisorTable"]}[Content],
- #"Changed Type" = Table.TransformColumnTypes(Source,{{"Employee Number", Int64.Type}, {"Last Name Start", type text}, {"Last Name End", type text}, {"First Name", type text}, {"Last Name", type text}}),
- #"Custom: Last Name Start Char" = Table.AddColumn(#"Changed Type", "Last Name Start Char", each Character.ToNumber([Last Name Start])),
- #"Custom: Last Name End Char" = Table.AddColumn(#"Custom: Last Name Start Char", "Last Name End Char", each Character.ToNumber([Last Name End])),
- #"Array: Start Char..End Char" = Table.AddColumn(#"Custom: Last Name End Char", "Character Code Range", each {[Last Name Start Char]..[Last Name End Char]}),
- #"Expand: Char Range" = Table.ExpandListColumn(#"Array: Start Char..End Char", "Character Code Range")
- in
- #"Expand: Char Range"
Add Comment
Please, Sign In to add comment