Results 1 to 5 of 5

Thread: Stripping spaces from numbers

  1. #1

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Stripping spaces from numbers

    I've got a column of numbers.
    Each number is 19 digits long, and there are NO leading zeros.

    Unfortunately, these numbers have intermittent spaces in the middle of them which I need to strip out.

    e.g. 292 393 67675363 98769

    I tried using the INSTR function, but that was giving me some weird results.

    This is pretty urgent, so any input would be greatly appreciated.

    Cheers

    Steve

  2. #2
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429
    Here is a snippet from the VB Forum:
    VB Code:
    1. Dim intRowMax As Integer, intRowIdx As Integer
    2.  
    3. intRowMax = ActiveSheet.UsedRange.Rows.Count
    4.  
    5. For intRowIdx = 1 To intRowMax
    6.     ActiveSheet.Range("A" & intRowIdx).Value = Replace(ActiveSheet.Range("A" & intRowIdx).Value, " ", "")
    7. Next




    Bruce.

  3. #3

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Resolved

    Ta

    Anyone wanting any more results on this thread go here :

    Other Thread !

    .... as I was just too damn lazy to wait in the VBA forum

  4. #4
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    Getting an answer in less than a hour, but still complaining!
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  5. #5

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818
    Originally posted by opus
    Getting an answer in less than a hour, but still complaining!
    I blame the wife ... I've been brainwashed !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width