Thank you for pointing me in the right direction. I recorded a macro to determine the language I thought I should use to sort the columns of filtered data, but the code which I modified some, doesn't seem to be working. Here is the code for the entire macro:
Sub CreateDynamicRange()
Dim LR As Long
LR = Cells.Find("*", Cells(Rows.Count, Columns.Count), SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
Sheets("Data").Range("B6:B" & LR).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Sheets("CBList").Range("A1"), Unique:=True
Sheets("Data").Range("C6:C" & LR).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Sheets("CBList").Range("C1"), Unique:=True
Sheets("Data").Range("F6:F" & LR).AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Sheets("CBList").Range("E1"), Unique:=True
Sheets("CBList").Range("A1:A35").Sort Key1:=Range("A2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Sheets("CBList").Range("C1:C35").Sort Key1:=Range("C2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Sheets("CBList").Range("E1:E35").Sort Key1:=Range("E2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
The ranges are dynamic named ranges, but I don't think I can reference that in this code seeing as the blank cells in the list are causing the named ranges to not expand to include all of the necessary data. I included 35 rows in each, as I don't anticipate having more than that much data in each column.
Thank you for any help.
Jason
Bookmarks