Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. mjmacarty

    Using Trim function

    Sorry Frederico. I was dealing with numbers not behaving as numbers copied from a website. Thanks though.
  2. mjmacarty

    Using Trim function in Excel

    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.
  3. mjmacarty

    Using Trim function

    This works: Sub FixIt() For j = 4 To 15 For i = 2 To 33 Shit = Cells(i, j).Value Cells(i, j).Value = Val(Shit) Next i Next j End Sub
  4. mjmacarty

    Using Trim function in Excel

    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...
  5. mjmacarty

    Using Trim function

    Thanks for your help. That doesn't seem to do the trick either. Code runs fine but doesn't do what it's supposed to.
  6. mjmacarty

    Using Trim function

    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...
  7. mjmacarty

    Using VBA to select characters from a cell range

    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...
  8. mjmacarty

    Using VBA to select characters from a cell range

    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?

Part and Inventory Search

Back
Top