flyfisher15
01-20-2012, 01:55 PM
I'm attempting to clear text out of the right hand side of a cell. The cell looks like this.
"431: were staged"
The numerical value in this case 431 can be as large as 6 digits or as small as 2. I need to delete the ": were staged" text off the number.
I've tried using
Dim x As String
Dim y As String
Dim z As String
Dim trimstring
x = Range("b1")
y = Right(x, 13)
z = x - y
End Sub
without success
I've also tried the .characters function but I can't get it to count from the right.
Any help would be much appreciated!
"431: were staged"
The numerical value in this case 431 can be as large as 6 digits or as small as 2. I need to delete the ": were staged" text off the number.
I've tried using
Dim x As String
Dim y As String
Dim z As String
Dim trimstring
x = Range("b1")
y = Right(x, 13)
z = x - y
End Sub
without success
I've also tried the .characters function but I can't get it to count from the right.
Any help would be much appreciated!