+ Reply to Thread
Results 1 to 3 of 3

Convert word or text file to Excel

Hybrid View

  1. #1
    Registered User
    Join Date
    03-05-2012
    Location
    Yorkshire
    MS-Off Ver
    Excel 2016
    Posts
    79

    Convert word or text file to Excel

    Hi All,
    I have a file that I would like to put into Excel for Ebay categories. Can someone kindly show me how to split the category description in to one column and the bracketed number in to the next please.
    Attached Files Attached Files

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Convert word or text file to Excel

    1. Copy the material from Word into Excel
    2. Put the following macros into a standard module:
    Sub HyperKiller()
        ActiveSheet.Hyperlinks.Delete
    End Sub
    
    Sub ShapeKiller()
        Dim s As Shape
        For Each s In ActiveSheet.Shapes
            s.Delete
        Next
    End Sub
    
    Sub RowKiller()
        Dim N As Long, r As Range
        N = Cells(Rows.Count, "A").End(xlUp).Row
        For nn = N To 1 Step -1
            With Cells(nn, "A")
            .Value = Replace(.Value, Chr(183), "")
            .Value = Replace(.Value, Chr(160), "")
            If Len(Trim(.Value)) < 2 Then
                .EntireRow.Delete
            End If
            End With
        Next
    End Sub
    
    Sub MAIN()
        Call HyperKiller
        Call ShapeKiller
        Call RowKiller
        Call MoveData
    End Sub
    
    Sub MoveData()
        Dim N As Long
        N = Cells(Rows.Count, "A").End(xlUp).Row
        For nn = 1 To N
            With Cells(nn, "A")
                If Left(.Value, 1) <> " " Then
                    .Copy .Offset(0, 1)
                    .Clear
                End If
            End With
        Next
    End Sub
    3. Run the MAIN macro
    Last edited by Jakobshavn; 05-25-2013 at 09:31 AM.
    Gary's Student

  3. #3
    Registered User
    Join Date
    03-05-2012
    Location
    Yorkshire
    MS-Off Ver
    Excel 2016
    Posts
    79

    Re: Convert word or text file to Excel

    Hello Jacobshavn,
    Thanks for that. I will try it tomorrow.
    Best regards
    Jason

+ 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