Hi Tek-Tips,
The value of my customer_name table, are shown below:
Kym Woolford Carpet Choice SN1517
City Carpet Choice SN1702
Dubbo Carpet Choice SN1220
Hirns Carpet Choice Mt Isa SN1906
Hirns Carpet Choice Mt Isa SN1906
The below formula given to me below, drops part of the customer name leaving only the number
stringvar array x := split({Sheet1_.Sold-to party}," ");
stringvar y := trim(x[ubound(x)]);
replace(y,"SN","")
Result:
1517
1702
122
1906
1906
The formula works perfectly BUT if the customer name has ZERO value at the end of the customer name (eg Dubbo Carpet Choice SN1220), the below result is INCORRECT because it ignores the ZERO number.
122
The correct result should be below:
1220
Can anyone assist on how to amend the above formula to include the ZERO digit particularly when it is placed as the last number from the customer name.
Appreciate any help
Jeffcis
The value of my customer_name table, are shown below:
Kym Woolford Carpet Choice SN1517
City Carpet Choice SN1702
Dubbo Carpet Choice SN1220
Hirns Carpet Choice Mt Isa SN1906
Hirns Carpet Choice Mt Isa SN1906
The below formula given to me below, drops part of the customer name leaving only the number
stringvar array x := split({Sheet1_.Sold-to party}," ");
stringvar y := trim(x[ubound(x)]);
replace(y,"SN","")
Result:
1517
1702
122
1906
1906
The formula works perfectly BUT if the customer name has ZERO value at the end of the customer name (eg Dubbo Carpet Choice SN1220), the below result is INCORRECT because it ignores the ZERO number.
122
The correct result should be below:
1220
Can anyone assist on how to amend the above formula to include the ZERO digit particularly when it is placed as the last number from the customer name.
Appreciate any help
Jeffcis