Beginner1200
New Member
- Joined
- Jan 18, 2023
- Messages
- 16
- Office Version
- 2019
- Platform
- Windows
My Code Here is working fine! See further down
Using the same code as above. when I am writing straight "140" it is sorting without any problems... but if write "140; testline" then the sorting is putting to line 20. and this is not my idea.
It seems that I cannot get my "Left code to work ???"
I have tried many things now and I cannot find any solution on this... ??????
VBA Code:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Range(Left("A6", 3), Range(Left("A", 3) & Rows.Count).End(xlUp)).Offset(-1, 0).Sort Key1:=Range(Left("A6", 3)), Order1:=xlAscending, Header:=xlYes
Application.Calculation = xlAutomatic
End Sub
Using the same code as above. when I am writing straight "140" it is sorting without any problems... but if write "140; testline" then the sorting is putting to line 20. and this is not my idea.
It seems that I cannot get my "Left code to work ???"
I have tried many things now and I cannot find any solution on this... ??????
Last edited by a moderator: