+ Reply to Thread
Results 1 to 11 of 11

eliminating leading space

Hybrid View

  1. #1
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Make sure the cells are not formatted as text. If it still doesn't work, post an example.

  2. #2
    Registered User
    Join Date
    12-06-2007
    Posts
    5
    attached is tab-delimited .txt version of spreadsheet ... I must be missing some simple thing because it doesn't seem to work ...

    if you figure out what the problem is, wonderful, because I have this situation with about 20 other spreadsheets I work with and have resorted to basically rekeying the info (which is annoying and very very time-consuming)

    thanks for your help
    Attached Files Attached Files

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    The text file doesn't help; please post the spreadsheet.

    I imported the text file; there's a horizontal tab that needs to be discarded.

    Gotta hop on an airplane, sorry. If no one fixes this for you, I'll try to post a macro this evening.
    Last edited by shg; 12-06-2007 at 02:44 PM.

  4. #4
    Registered User
    Join Date
    12-06-2007
    Posts
    5
    it won't let me post the spreadsheet, will it ... I tried that the first time but it said it didn't recognize the file (so I looked at the list and didn't see .xls on the list)

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    You need to zip it, max size 100K.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    OK, run this after you import:
    Sub x()
        Dim cell As Excel.Range
        
        For Each cell In ActiveSheet.UsedRange
            If IsError(cell) Then
                cell.ClearContents
            Else
                cell.Value = WorksheetFunction.Clean(cell.Value)
            End If
        Next cell
    End Sub
    Never mind posting the workbook unless you still have problems.

  7. #7
    Registered User
    Join Date
    12-06-2007
    Posts
    5
    shg: You are wonderful! Thank you so much. You have now saved me about 10 hours each week of messing with stats before I can actually analyze them.

    Trevor

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1