manosalexo
New Member
- Joined
- Mar 5, 2019
- Messages
- 8
Hello there.
I have a situation.
Every once a month i have to deal with some addresses.
I have managed so far to remove some useless information like this
[TABLE="width: 473"]
<colgroup><col></colgroup><tbody>[TR]
[TD]ΗΡΑΚΛΕΙΔΩΝ 36 ΑΘΗΝΑ 11851 ΑΤΤΙΚΗΣ[/TD]
[/TR]
[TR]
[TD]ΗΡΩΩΝ ΠΟΛΥΤΕΧΝΕΙΟΥ 23 ΑΓ.ΣΤΕΦΑΝΟΣ 14565 ΑΤΤΙΚΗΣ[/TD]
[/TR]
[TR]
[TD]ΠΥΡΓΙΩΤΙΣΣΗΣ 29 ΠΕΡΙΣΤΕΡΙ 12136 ΑΤΤΙΚΗΣ[/TD]
[/TR]
[TR]
[TD]ΤΡΥΠΙΑ 26 Β ΠΕΥΚΗ 15121 ΑΤΤΙΚΗΣ[/TD]
[/TR]
[TR]
[TD]EYΓENΩN 5 - ΠEPIΣTEPI 12134
Result:
[TABLE="width: 340"]
<colgroup><col></colgroup><tbody>[TR]
[TD]ΗΡΑΚΛΕΙΔΩΝ 36 ΑΘΗΝΑ[/TD]
[/TR]
[TR]
[TD]ΗΡΩΩΝ ΠΟΛΥΤΕΧΝΕΙΟΥ 23 ΑΓ.ΣΤΕΦΑΝΟΣ[/TD]
[/TR]
[TR]
[TD]ΠΥΡΓΙΩΤΙΣΣΗΣ 29 ΠΕΡΙΣΤΕΡΙ[/TD]
[/TR]
[TR]
[TD]ΤΡΥΠΙΑ 26 Β ΠΕΥΚΗ[/TD]
[/TR]
[TR]
[TD]EYΓENΩN 5 ΠEPIΣTEPI
Now i want to line split to the next column anything that is right of the number value.
I have been using this line of code:
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
Could anyone please help me?
Thanks in advance
I have a situation.
Every once a month i have to deal with some addresses.
I have managed so far to remove some useless information like this
[TABLE="width: 473"]
<colgroup><col></colgroup><tbody>[TR]
[TD]ΗΡΑΚΛΕΙΔΩΝ 36 ΑΘΗΝΑ 11851 ΑΤΤΙΚΗΣ[/TD]
[/TR]
[TR]
[TD]ΗΡΩΩΝ ΠΟΛΥΤΕΧΝΕΙΟΥ 23 ΑΓ.ΣΤΕΦΑΝΟΣ 14565 ΑΤΤΙΚΗΣ[/TD]
[/TR]
[TR]
[TD]ΠΥΡΓΙΩΤΙΣΣΗΣ 29 ΠΕΡΙΣΤΕΡΙ 12136 ΑΤΤΙΚΗΣ[/TD]
[/TR]
[TR]
[TD]ΤΡΥΠΙΑ 26 Β ΠΕΥΚΗ 15121 ΑΤΤΙΚΗΣ[/TD]
[/TR]
[TR]
[TD]EYΓENΩN 5 - ΠEPIΣTEPI 12134
Result:
[TABLE="width: 340"]
<colgroup><col></colgroup><tbody>[TR]
[TD]ΗΡΑΚΛΕΙΔΩΝ 36 ΑΘΗΝΑ[/TD]
[/TR]
[TR]
[TD]ΗΡΩΩΝ ΠΟΛΥΤΕΧΝΕΙΟΥ 23 ΑΓ.ΣΤΕΦΑΝΟΣ[/TD]
[/TR]
[TR]
[TD]ΠΥΡΓΙΩΤΙΣΣΗΣ 29 ΠΕΡΙΣΤΕΡΙ[/TD]
[/TR]
[TR]
[TD]ΤΡΥΠΙΑ 26 Β ΠΕΥΚΗ[/TD]
[/TR]
[TR]
[TD]EYΓENΩN 5 ΠEPIΣTEPI
Now i want to line split to the next column anything that is right of the number value.
I have been using this line of code:
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
Code:
Dim allCombi As String
Dim allArrCombi(), allAftCombi() As String
sourceADR = Worksheets("CASE").Range("N" & i).Value
Worksheets("MAIN_CONTROL").Cells(i, 25).Value = sourceADR
sourceADR = Replace(sourceADR, "ÁÔÔÉÊÇÓ", "")
'...................................................................
sourceADR = Replace(sourceADR, "-", " ")
sourceADR = Replace(sourceADR, " ", " ")
sourceADR = Trim(sourceADR)
auxC = sourceADR
Worksheets("MAIN_CONTROL").Cells(i, 26).Value = sourceADR
'..............................
If (Len(sourceADR) < 1) Then GoTo aseAddr
'..............
mainAddress = Split(sourceADR)
addrAA = ""
Worksheets("MAIN_CONTROL").Cells(i, 24).Value = Str(UBound(mainAddress)) & "@@" & Str(LBound(mainAddress))
For jA = UBound(mainAddress) To LBound(mainAddress) Step -1
'......................................................
If (regex.Test(Trim(mainAddress(jA)))) Then
auxC = Replace(auxC, Trim(mainAddress(jA)), "")
destws.Range("BT" & i).Value = Trim(mainAddress(jA))
destws.Range("AA" & i).Value = Trim(mainAddress(jA))
'destws.Range("Z" & i).Value = addrAA
auxC = Trim(auxC)
destws.Range("Y" & i).Value = auxC
destws.Range("Z" & i).Value = addrAA
'--------------------------------------------------------
'-------------------------------------------------------
GoTo aseAddr
End If
auxC = Replace(auxC, Trim(mainAddress(jA)), "")
addrAA = mainAddress(jA) & " " & addrAA
'
'.....................................................
Next jA
Could anyone please help me?
Thanks in advance