Monday, May 20, 2013   
  Search   
 

Office 2010 - Launch Event

Register  Login  
Forums  
     Minimize  

MeraWindows Forums - Get your Computer Problems Fixed

This is a site run by the community - for the community. At the site, we share and contribute our computer learnings with each other. We discuss about Windows, Office, Mobile, Gaming and other computer related topics. At our forums you can post your queries and our very helpful community members will respond quickly to your queries. We organize lots of competitions from time to time and award prizes to the winners.
You will need to register at the site before posting in forums. It's absolutely free. After registering, you can get all the benefits available to our registered members, you can access our Downloads section, you can participate in contests, etc. You can post in forums in English as well as in Hindi, in fact we encourage you to use Hindi in your posts. If you have any problem with registration or login, please contact us.

     
  
HomeHomeMicrosoft Offic...Microsoft Offic...Microsoft ExcelMicrosoft ExcelAuto sort as data is entered in the list.Auto sort as data is entered in the list.
Previous
 
Next
New Post
4/24/2012 4:53 PM
 
Hey all,

I have a sheet in which I have a list of debtors in one column and creditors in another. Now if I have to add a New Name to the list is there any way to auto sort the list as I enter the data.

Thanks in advance for your kind assistance.
 
New Post
4/25/2012 4:52 AM
Accepted Answer 
Hi,

Upload the file and explain the problem very clearly.

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
4/26/2012 9:21 PM
 
Hi Ashish,

Thank you very much for your reply. I have attached the file for your reference. In the Sheet Name List there are 3 Columns Debtors, Creditors and Expenses. Now if I add a name to debtors list then the whole list should sort in alphabetical order as I add the name, same should be in Creditors and Expenses.
 
 NewExcel (2).xlsx
New Post
4/27/2012 5:20 AM
 
Hi,

Try this VBA code.

1. Right click in the List tab and select "View code"
2. In the left hand side panel, click on the List worksheet
3. In the right hand side white space, paste the following code

Private Sub Worksheet_Change(ByVal Target As Range)
Dim row_no As Integer
If Intersect(Target, Range("A3:C15")) Is Nothing Then
    Exit Sub
Else
    row_no = Target.Row - 1
    If Len(row_no) > 0 Then
        Range(Cells(2, Target.Column), Cells(2, Target.Column).End(xlDown)).Sort Key1:=Range(Cells(2, Target.Column)), _
   Order1:=xlAscending, Header:=yes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    Else
        Exit Sub
    End If
End If
End Sub

Now if you add/edit/change any value in range A3:C15 of the List sheet, that specific column will sort in ascending order.

Hope this helps.


For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
New Post
4/27/2012 5:23 PM
 
Hi Ashish,

Thank you very much for your prompt assistance.
 
New Post
4/27/2012 5:26 PM
 
Hi Ashish,

Thank you very much for your prompt assistance.
1 Reports 
New Post
4/27/2012 5:26 PM
 
Hi Ashish,

Thank you very much for your prompt assistance.
1 Reports 
New Post
4/27/2012 5:28 PM
 
You are welcome.

For Microsoft Excel trainings in India, please visit http://www.ashishmathur.com/corporate-interventions/

Regards,

Ashish Mathur - View Ashish Mathur's profile on LinkedIn
Microsoft Excel MVP
Website
Blog
 
Previous
 
Next
HomeHomeMicrosoft Offic...Microsoft Offic...Microsoft ExcelMicrosoft ExcelAuto sort as data is entered in the list.Auto sort as data is entered in the list.


   User Log In Minimize  


Register
Forgot Password ?

     
  
   Follow Us Minimize  
     
  
     Minimize