Page 1 of 1

Split an address line

Posted: Sat Mar 23, 2019 6:21 pm
by HC_1
I am looking to split out a house number or name from the first line of an address and place the house number/name into a separate field to the address line. The format being used currently includes a comma after the house number/name e.g. House Name/Number, Street Name.

I have tried using the LISTITEM function with the deliminator as the comma but this is returning the full address line each time. Can anyone assist as to the easiest way of achieving this please ?

Thanks in advance.

Re: Split an address line

Posted: Sun Mar 24, 2019 8:40 pm
by revellbikes
I'd probably approach it with the SPLIT command and cycle through each character from character 1 then test to see if it CONTAINS ","

Adding one character each time to the split length, minus 1 once you've hit the comma so you don't get the house name / number and the comma.