+ Reply to Thread
Results 1 to 3 of 3

Referenced sheet, automatically sort (alpha) and send blanks to the bottom.

  1. #1
    Registered User
    Join Date
    05-02-2012
    Location
    Arizona, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Referenced sheet, automatically sort (alpha) and send blanks to the bottom.

    Good Morning Everyone!

    For starters, I have to say thank you for all the amazing help this forum has provided me - I have created some spreadsheets that I am so proud of and that turned around some of the very disfunctional processes we had at my work The consequence of which, is that the supervisors are drafting up more complicated and convoluted projects for me to tackle! Unfortunately, my research over the past 2 weeks(!) to solve my own problem has turned up fairly fruitless, so I could really use some help, please, if you all don't mind.

    Ok, this is a chemical database- excel 2003, detailing some of the basic information for categorizing, where specific chemicals are located in the facility, and hazard level. There are 19 worksheets. The first 7 are named after colors (hazard level), the 8th is inconsequential, the 9th is an A-Z Alphabetical listing, and the last 10 are named after each location. All 7 color sheets are referenced to each of the other worksheets, then filtered so that "location one" only shows what chemicals are physically in that location.

    The A-Z listing needs to automatically compile all the worksheets named after colors. Done.
    The A-Z listing needs to automatically alphabetize all the chemicals, so that if I add "test" to the "Green" worksheet, it will be instantly alpha'd between "technovit" and "tetra".
    The A-Z listing needs to have empty lines (basically whenever column C is empty, there is nothing of use there) at the bottom - which I why I cant use the autofilter that I desperately hoped to use!

    The data needs to be alphabetized by column "C" (and take the entire row with it) and my range of data, not including headers, is A4:S1872

    I came across this code "Sort as you Go" (and I can't remember from who - Im terribly sorry) on this forum and its exactly what I want, but I cannot get it to work and I am wondering if its because my cells are referenced from the other worksheets. Do you guys think thats what my problem is? I have never had such a problem tweaking these codes, and I have found probably 5-6 that possibly would have worked, but I must be getting something wrong!! (I am self taught and have no formal training, so please forgive any ignorance here )

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim isect As Range
    Dim LastRow As Long

    LastRow = Range("A" & Rows.Count).End(xlUp).Row
    If LastRow = 1 Then Exit Sub
    If Target.Cells.Count > 1 Then Exit Sub

    Set isect = Intersect(Target, Range("A2:B" & LastRow))
    If Not isect Is Nothing Then
    Range("A2:B" & LastRow).Sort key1:=Range("B2"), Order1:=xlAscending
    End If
    End Sub

    Thank you so much for any time spent reading this post and any help to follow!
    Last edited by jw586; 05-08-2012 at 12:09 PM.

  2. #2
    Registered User
    Join Date
    05-02-2012
    Location
    Arizona, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Referenced sheet, automatically sort (alpha) and send blanks to the bottom.

    Hey! I was finally able to upload a file! Haha it took forever... sorry. A MUCH abridged version... hope this helps.

    Thanks again!
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-02-2012
    Location
    Arizona, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Referenced sheet, automatically sort (alpha) and send blanks to the bottom.

    Can anybody help or offer any insight? Thanks again!

+ Reply to Thread

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