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 workThe 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!
Bookmarks