Excel - A Macro to move data from rows to columns
Closed
                    
        
                    yvonlet
    
        
                    Posts
            
                
            2
                
                            Registration date
            Wednesday August 17, 2016
                            Status
            Member
                            Last seen
            August 25, 2016
            
                -
                            Aug 17, 2016 at 01:37 PM
                        
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Aug 30, 2016 at 11:49 AM
        TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Aug 30, 2016 at 11:49 AM
        Related:         
- Excel - A Macro to move data from rows to columns
 - Transfer data from one excel worksheet to another automatically - Guide
 - Tweetdeck larger columns - Guide
 - Excel move data from one sheet to another - Guide
 - Excel online macros - Guide
 - Display two columns in data validation list but return only one - Guide
 
1 response
                
        
                    TrowaD
    
        
                    Posts
            
                
            2921
                
                            Registration date
            Sunday September 12, 2010
                            Status
            Contributor
                            Last seen
            December 27, 2022
            
            
                    555
    
    
                    
Aug 25, 2016 at 11:33 AM
    Aug 25, 2016 at 11:33 AM
                        
                    Hi Yvonlet,
That happens because you delete columns C:E, thus changing the cell references in your formula's.
Consider changing:
into
Best regards,
Trowa
            That happens because you delete columns C:E, thus changing the cell references in your formula's.
Consider changing:
.Delete
into
.ClearContents
Best regards,
Trowa
        
    
    
    
    
Aug 25, 2016 at 12:57 PM
It work first time with the ClearContents.
Now, just another question.
I would like to clear all contents in my TAB:
Columns("a:z").ClearContents,
but then, use the clipboard to do a
Paste Special, Text into cell A2-A20 of the same TAB.
Do you know of such command?
But again, so many thanks for the Clear.
Aug 30, 2016 at 11:49 AM
Where is the data you want to put in A2-A20 coming from?
Same sheet?: then you can either clear the contents around that range or copy that range outside the cleared range first.
Other sheet?: then you can clear first and copy later.
Not sure if this is helpful. If not, then explain in greater detail what you are after.
Also to clear an entire sheet you can use: .
Best regards,
Trowa