on ‎2020 Aug 10 5:13 AM
Hi all,
I have an address block like such;
123 Fake St
Suburb, VIC
4512
I want to only remove the last carriage return so it looks like;
123 Fake St
Suburb VIC 4512
I know i can use the following to get rid of all the carriage returns which does put it all on one line and i have played around with this with no luck getting it right. I have a feeling i need to use a combination of instr, strreverse and right but havent been able to get the logic to work.
replace({Header.Address},chrw(13),'')
As always, any help is greatly appreciated.
Request clarification before answering.
Hi,
Please try with below code but condition is you know the last some characters from data.
With using below coding I differentiate on two parts, part 1 is for left side all data and part 2 is for replace chr(13) to ' ').
Part 1
left ("123 Fake St" & chr(13) & "Suburb, VIC" & chr(13) & "4512",len("123 Fake St" & chr(13) & "Suburb, VIC" & chr(13) & "4512")-5 )
Part 2
Replace ("123 Fake St" & chr(13) & "Suburb, VIC" & chr(13) & "4512",chr(13), ' ', len("123 Fake St" & chr(13) & "Suburb, VIC" & chr(13) & "4512")-4)
Whole query
left ("123 Fake St" & chr(13) & "Suburb, VIC" & chr(13) & "4512",len("123 Fake St" & chr(13) & "Suburb, VIC" & chr(13) & "4512")-5 ) & Replace ("123 Fake St" & chr(13) & "Suburb, VIC" & chr(13) & "4512",chr(13), ' ', len("123 Fake St" & chr(13) & "Suburb, VIC" & chr(13) & "4512")-4)
If any further query please inform.
- Rajkumar Mane
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.