To use VBA to modify cell contents, there needs to be some sort of logical pattern you can include.
In your examples, there isn't an obvious pattern (not obvious to me, at least).
In this case, the cell contains the text "data123-124" and it seems that you want to remove anything from the hyphen onwards.
data123-124 should become data123
In this example it seems that the cell contains the text "data123 & 5020" and you want to remove anything from the first space onwards.
data123 & 5020 should become data123
In this example, the cell seems to contain the text "data 123b" and you want to remove just the final character (ie. not from the first space).
data 123b should become data 123
Please can you clarify a set of rules as to what should be removed? Is it that you want to remove any characters which follow the first complete number?
Please also clarify if this is a one-off event, or something that has to happen with regularity?
If you are familiar with regular expressions then you could use them to do this.
Another option is to write your own function using the built-in VBA functions to do it. Here's an example:
Debug.Print foo("data123-124") 'should become data123
Debug.Print foo("data 123b") 'data 123
Debug.Print foo("d.a\t;a, 45A - 46B") 'd.a\t;a, 45
Debug.Print foo("data123 & 5020 ") 'should become data123
Debug.Print foo("d") 'should become d
Function foo(ByRef strToCheck As String) As String
Dim i As Long, lAsc As Long, lLength As Long
Dim bNumberFound As Boolean
lLength = VBA.Len(strToCheck)
For i = 1 To lLength
lAsc = VBA.AscW(VBA.Mid$(strToCheck, i, 1))
If lAsc >= 48 And lAsc <= 57 Then
bNumberFound = True
If bNumberFound Then
i = i - 1
foo = VBA.Left$(strToCheck, i)