Hello Chandoo ninjas and users. I would like to make two function work in conjunction when i click on one button. Thanks again for your time and help.
Add this
To this
Add this
Code:
Sub FindAndPlaceValuesInColumnC()
Dim lr As Long
Dim rng As Range, cell As Range
Application.ScreenUpdating = False
Application.EnableEvents = False
lr = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
ActiveSheet.ListObjects("Table134").Range.AutoFilter field:=7, Criteria1:="1"
If Range("G4:G" & lr).SpecialCells(xlCellTypeVisible).Cells.Count > 1 Then
Set rng = Range("F5:F" & lr).SpecialCells(xlCellTypeVisible)
For Each cell In rng
If InStr(Cells(cell.Row, "C").Value, " (") = 0 Then
Cells(cell.Row, "C") = Cells(cell.Row, "C") & " (" & Trim(Replace(cell.Value, "*", "")) & ")"
Else
Cells(cell.Row, "C") = WorksheetFunction.Replace(Cells(cell.Row, "C").Value, InStr(Cells(cell.Row, "C"), " ("), 255, " (" & Trim(Replace(cell.Value, "*", "")) & ")")
End If
Next cell
End If
ActiveSheet.ListObjects("Table134").Range.AutoFilter field:=7
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
To this
Code:
Private Sub CommandButton4_Click()
'
' refresh Macro
'
'
ActiveWorkbook.Worksheets("GENERAL").ListObjects("Table134").Sort.SortFields. _
Clear
ActiveWorkbook.Worksheets("GENERAL").ListObjects("Table134").Sort.SortFields. _
Add Key:=Range("Table134[[#All],[TIMER]]"), SortOn:=xlSortOnValues, Order _
:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("GENERAL").ListObjects("Table134").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveWorkbook.Worksheets("GENERAL").ListObjects("Table134").Sort.SortFields. _
Clear
ActiveWorkbook.Worksheets("GENERAL").ListObjects("Table134").Sort.SortFields. _
Add Key:=Range("Table134[[#All],[TASK]]"), SortOn:=xlSortOnValues, Order _
:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("GENERAL").ListObjects("Table134").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveWorkbook.Worksheets("GENERAL").ListObjects("Table134").Sort.SortFields. _
Clear
ActiveWorkbook.Worksheets("GENERAL").ListObjects("Table134").Sort.SortFields. _
Add Key:=Range("Table134[[#All],[ORGANIZER]]"), SortOn:=xlSortOnValues, _
Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("GENERAL").ListObjects("Table134").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Unload Me
End Sub