View Poll Results: Where do you fgo for answers?

Voters
1. This poll is closed
  • websites

    1 100.00%
  • books

    0 0%
  • IT experts

    0 0%
  • EXCEL HELP

    0 0%
Multiple Choice Poll.
Results 1 to 3 of 3

Sorting related columns alphabetically

Threaded View

  1. #1
    Registered User
    Join Date
    11-16-2010
    Location
    Manila
    MS-Off Ver
    Excel 2003
    Posts
    2

    Sorting related columns alphabetically

    Hello everyone.

    It's good i stumbled upon this website. i learned a lot using excel with this site.

    I need help on the following matter.

    I have a workbook that contains a sheet with a source list of ingredients with their corresponding prices and packaging criteria. This source list supports another workbook which calculates recipe costs.

    I need to find a code or something that would allow the list to arrange alphabetically automatically by the first column which contains the ingredient name. End result should be that whenever I add a new ingredient to the source list, the list would arrange automatically and it's corresponding prices and packaging will follow suit.

    i have searched throughout the forums but the codes i get only rearranges the new items. For example, the following code:

    Private Sub Worksheet_Change(ByVal Target As Range)
    'Check that cell changed was in col E. If not, exit.
    If Target.Column <> 5 Then Exit Sub
    
    'Sort cells alphabetically a:e by col a ascending. Presumes header in row 1
    Range("A2:E1000").Sort Key1:=Range("e1"), Order1:=xlAscending, Header:= _
    xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    DataOption1:=xlSortNormal
    End Sub
    ...works, but after entering the last data it would jump to the top of the list instead of rearranging the entire list. I have been trying several codes, but this is the closest. I have attached the worksheet for your reference.

    Please help. i need this done. i would be very grateful

    Ivan
    Attached Files Attached Files
    Last edited by DonkeyOte; 11-16-2010 at 07:59 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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