Excel VBA Sorting Problem
Closed
                                    
                        Hassan                    
                                    -
                            Sep 27, 2019 at 12:29 PM
                        
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Sep 29, 2019 at 10:02 PM
        vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Sep 29, 2019 at 10:02 PM
        Related:         
- Excel VBA Sorting Problem
 - Excel online vba - Guide
 - Vba excel mac - Guide
 - Vba case like - Guide
 - Excel mod apk for pc - Download - Spreadsheets
 - Excel vba timer - Guide
 
1 response
                
        
                    vcoolio
    
        
                    Posts
            
                
            1411
                
                            Registration date
            Thursday July 24, 2014
                            Status
            Moderator
                            Last seen
            September  6, 2024
            
            
                    262
    
    
                    
Sep 29, 2019 at 06:52 AM
    Sep 29, 2019 at 06:52 AM
                        
                    Hello Hassan,
You haven't supplied the code so its a little difficult to determine what the problem is.
Please try again.
Cheerio,
vcoolio.
            You haven't supplied the code so its a little difficult to determine what the problem is.
Please try again.
Cheerio,
vcoolio.
        
    
    
    
    
Updated on Sep 29, 2019 at 10:05 PM
Sep 29, 2019 at 10:02 PM
I'm assuming then that your "SKU" column will never be in the same place (it could be Column C or Column F or Column Z etc.) so try the code amended as follows:-
Sub Sorting() Dim acell As Range Set acell = Rows(2).Find(What:="sku", LookIn:=xlValues, LookAt:=xlWhole) ActiveSheet.Range("A2").Sort acell.Offset(1), 2, Header:=xlYes End SubI'm also assuming that your data starts in Column A, Row3.
The code above should sort your data descending.
I hope that this helps.
Cheerio,
vcoolio.