MS Words into (comma-separated) text file
Solved/Closed
                                    
                        Amit                    
                                    -
                            Mar 10, 2010 at 04:34 PM
                        
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Mar 12, 2010 at 08:20 AM
        rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Mar 12, 2010 at 08:20 AM
        Related:         
- MS Words into (comma-separated) text file
 - Windows 10 iso file download 64-bit - Download - Windows
 - Dvi file - Guide
 - Ping to text file - Guide
 - Ms office save as pdf or xps file - Download - Other
 - Messenger file downloader - Guide
 
1 response
                
        
                    rizvisa1
    
        
                    Posts
            
                
            4478
                
                            Registration date
            Thursday January 28, 2010
                            Status
            Contributor
                            Last seen
            May  5, 2022
            
            
                    766
    
    
                    
Mar 12, 2010 at 08:20 AM
    Mar 12, 2010 at 08:20 AM
                        
                    I am sure #1 is do able too.
Here is solution for #2
Assumptions:
1. When you fire the macro, the sheet which is to be processed is the active sheet
2. Data is in only one row
            Here is solution for #2
Assumptions:
1. When you fire the macro, the sheet which is to be processed is the active sheet
2. Data is in only one row
Sub splitRowInCol()
Dim splitEveryCol As Integer 'how many cols to be used in a set
Dim lDataRow As Long ' on which the data resides that needs to be split
Dim totalCols As Integer 'total number of columns in use
Dim lCurrentRow As Long 'row counter to see where to paste
Dim iColCounter As Integer ' column counter to see what column set is to be used
    lDataRow = 1 'data is on row 1
    
    splitEveryCol = 12 'each data set is spread across  12 columns
    lCurrentRow = 1 '
    totalCols = Cells(1, Columns.Count).End(xlToLeft).Column
    
    For iColCounter = splitEveryCol + 1 To totalCols Step splitEveryCol
        Range(Cells(lDataRow, iColCounter), Cells(lDataRow, iColCounter + splitEveryCol - 1)).Select
        Selection.Cut
        
        Cells(lCurrentRow + 1, "A").Select
        ActiveSheet.Paste
        lCurrentRow = lCurrentRow + 1
    Next
    
End Sub