I have a column of telephone numbers in slightly different formats due to how the agents input them into the database. Some start with a 0 and some with 44 (country code). I have found a code online that has helped me remove the 0’s at the start of the string but now I am trying to adapt this to remove the 44 at the beginning of the string and for some reason, it doesn’t seem to want to play ball.
= Table.TransformColumns(
#"Renamed Columns",
{{
"telephone",
each if Text.Start(Text.From(_),2)="44"
then
""&Text.From(_)
else _
}})
Thanks in advance for any assistance
>Solution :
This should work
Table.TransformColumns(#"Changed Type",{{"telephone",each if Text.Start(Text.From(_),2)="44" then Text.RemoveRange(Text.From(_),0,2) else _ }})