Yes. Thanks, I figured it out. Actually, I was trying to update some numnbers that weren't behaving as numbers. Trim didn't do the trick. I used Val() instead. Thanks for the heads up.
I am trying to trim excess spaces off a range of cell values. I am using the following code with no luck:
Option Explicit
Dim i As Integer, j As Integer, Shit As String
Sub FixIt()
For j = 1 To 12
For i = 1 To 32
Shit = Cells(i, j).Value
Trim (Shit)
Next i
Next j
End...
I am trying to trim excess spaces off a range of cell values. I am using the following code with no luck:
Option Explicit
Dim i As Integer, j As Integer, Shit As String
Sub FixIt()
For j = 1 To 12
For i = 1 To 32
Shit = Cells(i, j).Value
Trim (Shit)
Next i
Next j
End...
OK. Here is an example of the code I am using incorporating your code.
Dim lftchar As String
lftchar = Application.Workbooks(1).Worksheets(1).Range("a1:a4").Left([identity], 3)
I want to paste the first three characters from all cells in column a to column b and add a 3 digit random...
I am trying to assign the first three characters of cell range to a variable. I would then like to copy and paste these characters into another cell range. Can't seem to do it! I have tried using both string and characters variable declarations. I am a novice though can someone help?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.