Hi Forum. I have a journal entries in a table. In cases of emergencies, a tipline might have to be created and someone is in charge of compiling all of the tips and deciding what priority they are. My table headers are as follows starting in row 5: TIME, PHONE, NAME, TIP, PRIORITY. I have 4 tabs: TipLog, Priority1, Priority2, and Priority3. I want to be able to categorize a record as Priority 1 and it automatically (or by way of a button) to look at the table, find the priority 1 records and copy them to the Priority1 tab, priority 2 records to Priority2 tab, and priority 3 records to Priority3 tab.
This is what I have so far. Am I on the right track?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim TipLog As Worksheet
Dim Priority1 As Worksheet
Dim priority2 As Workshet
Dim Priority3 As Worksheet
Dim Finalrow As Object
Dim ORange As Range ' Output range
Dim CRange As Range ' Criteria range
Dim IRange As Range ' Input range
Set ORange = Cells(1, 5)
Set IRange = Range("A5").Resize(Finalrow, 5)
Finalrow = Cells(Rows.Count, 1).End(xlDown).Row
Worksheets("TipLog").Select
Range("j1:az1").EntireColumn.Delete
Set TipLog = ActiveSheet
IRange.AdvancedFilter Action:=xlFilterCopy, criteriarange:=1, _
copytorange:=Priority1
IRange.AdvancedFilter Action:=xlFilterCopy, crieriarange:=2, _
copytorange:=prioirty2
IRange.AdvancedFilter Action:=xlFilterCopy, crieriarange:=3, _
copytorange:=prioirty3
' copy table header along with data and paste in another tab
If Target.Column = 5 And Target.Row > 5 Then
Range
End Sub
This is what I have so far. Am I on the right track?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim TipLog As Worksheet
Dim Priority1 As Worksheet
Dim priority2 As Workshet
Dim Priority3 As Worksheet
Dim Finalrow As Object
Dim ORange As Range ' Output range
Dim CRange As Range ' Criteria range
Dim IRange As Range ' Input range
Set ORange = Cells(1, 5)
Set IRange = Range("A5").Resize(Finalrow, 5)
Finalrow = Cells(Rows.Count, 1).End(xlDown).Row
Worksheets("TipLog").Select
Range("j1:az1").EntireColumn.Delete
Set TipLog = ActiveSheet
IRange.AdvancedFilter Action:=xlFilterCopy, criteriarange:=1, _
copytorange:=Priority1
IRange.AdvancedFilter Action:=xlFilterCopy, crieriarange:=2, _
copytorange:=prioirty2
IRange.AdvancedFilter Action:=xlFilterCopy, crieriarange:=3, _
copytorange:=prioirty3
' copy table header along with data and paste in another tab
If Target.Column = 5 And Target.Row > 5 Then
Range
End Sub