Okay - I need to sort Sheet 1 Col. B by using the data in Sheet 2 Col. A. (Sheet 2 col A contains text. Sheet 1 col. B is all formulas relating to the text in Sheet 2.) And again, I'd like to do this via a checkbox or option button or command button or something along those lines - where, when checked, it sorts Sheet1 colB by alphabetizing sheet2 colA; and when unchecked sorts all of Sheet1 by Sheet1 colA (which contians dates.)
Tried this code, but it didn't work:
Tried this code, but it didn't work:
Code:
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
Worksheets("Sheet1").Range("B4:B1000").Sort _
Key1:=Worksheets("Sheet2").Range("A4")
Else
Worksheets("Sheet1").Range("A4:A1000").Sort _
Key1:=Worksheets("Sheet1").Range("A4")
End If
End Sub