Sub PICKUP_SLA_ICE_Pass_2019()
    Workbooks("ESD_QA_2019.xlsx").Activate
    Sheets("JAN_ICE").Select
    Call ICE_PASS_2019
    Range("C:C").EntireColumn.Hidden = False
    Range("C" & Selection.row & "," & "D" & Selection.row & "," & "G" & Selection.row & ":H" & Selection.row & "," & "P" & Selection.row & "," & "R" & Selection.row & ":AL" & Selection.row).Select
    Selection.Copy
    Call PICKUP_AGENT_ICE_row_2019
End Sub
Sub PICKUP_SLA_ICE_Fail_2019()
    Workbooks("ESD_QA_2019.xlsx").Activate
    Sheets("JAN_ICE").Select
    Call ICE_FAIL_2019
    Range("C:C").EntireColumn.Hidden = False
    Range("C" & Selection.row & "," & "D" & Selection.row & "," & "G" & Selection.row & ":H" & Selection.row & "," & "P" & Selection.row & "," & "R" & Selection.row & ":AL" & Selection.row).Select
    Selection.Copy
    Call PICKUP_AGENT_ICE_row_2019
End Sub

Sub PICKUP_AGENT_ICE_row_2019()
'Set up and paste audit data to Email template
Sheets("E2A4CALL").Visible = True
Sheets("E2A4CALL").Select
Range("B7").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
        True, Transpose:=True
        
'Align Left
With Selection
        .HorizontalAlignment = xlLeft
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With

'Fix Borders
With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With

    
'SCORE Fix Formula
Range("G22").Select
Selection.Copy
    Range("B30").Select
    Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=False
'Center Score, Result and What Failed (S,R,WF)
Range("B30:B32").Select
    With Selection
        .HorizontalAlignment = xlCenter
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
        
'Clear Remarks and Comments Section
Range("A3,A36:B47,G9,H9").Select
Selection.ClearContents

'Check if 100%, add good job message
If Range("B30").Value = 100 And Range("B31").Value <> "Process Fail" Then
Range("A35") = Range("G5")
End If

'Add auto-default per selected criteria item
Range("G9") = "Get Answers Article Title"
Range("H9") = "Doc ID"
Range("A39") = Range("F39").FormulaR1C1
Range("A41") = Range("F41").FormulaR1C1
Range("A43") = Range("F43").FormulaR1C1
Range("A45") = Range("F45").FormulaR1C1
Range("A47") = Range("F47").FormulaR1C1

'Unhide Hidden rows from last Email...
Range("28:54").EntireRow.Hidden = False

'Loop Feedback Comments populate
Call GetSearchArray_ICE("No", Range("B16:B29"))
Application.Calculate
'Worksheets(11).Calculate
'Rows("X:Y").EntireRow.AutoFit

'Get Back to Ticket Auditing Next Agent
Windows("ESD_QA_2019.xlsx:2").Activate
Sheets("Progress&Results").Select
Windows("ESD_QA_2019.xlsx:1").Activate
Sheets("E2A4CALL").Select

'Highlight Call Date and reference SR ticket #
Call HighlightYellow_ICE_SR_CALL_DATE_REF

'Hide Empty below rows
If Range("B32") = "" Then
Rows("32:32").EntireRow.Hidden = True
End If
Call UNHIDE_EmptyRows_2019("", Range("A3:A4"))
Call UNHIDE_EmptyRows_2019("", Range("A35:A47"))
End Sub


Sub Email_ICE_CALLS_TO_AGENT_2019()

Dim AWorksheet As Worksheet
Dim Sendrng As Range
Dim rng As Range
Dim timeTix As Range
Set timeTix = Range("B13")

Set Sendrng = Worksheets("E2A4CALL").Range("A1:B60") 'Set specific Range to be Copied to the Email
Set AWorksheet = ActiveSheet    'Remember the Active Sheet

'Hide Empty below rows
Call HideEmptyRows_2019("", Range("A3:A4"))
Call HideEmptyRows_2019("", Range("A35:A47"))

'Disable Application features to increase speed
With Application
    .ScreenUpdating = False
    .EnableEvents = False
    
End With

With Sendrng
         'Select the worksheet with the range you want to send
         .Parent.Select

         'Remember the ActiveCell on that worksheet
         Set rng = ActiveCell

         'Select the range you want to mail
         .Select

         'Create the mail and send it
    If ActiveWorkbook.EnvelopeVisible = False Then  'Toggle Email if it's not displayed already
         ActiveWorkbook.EnvelopeVisible = True
         With .Parent.MailEnvelope
            'Add a intro to the email before mailing the selected range.
            '.Introduction = "Hello " & Range("D8") & "," & vbNewLine & vbNewLine & "One of your tickets, " & Range("B20") & ", was recently reviewed." & vbNewLine & "Please take the time to review it when you can."
            'Set email properties (to,cc,subject..etc)
             With .Item
                .to = Range("I3")
                .CC = "ESD TL / BSE CE (SSC/SPC)"
                If Range("A35") = Range("G5") And Range("B31").Value <> "Process Fail" Then
                    .Subject = "QA - Call Feedback - " & Range("B12") & " - " & Format(Range("B13"), "hh:mm:ss") & " - " & Range("A35")
                ElseIf Range("B31") = "Process Fail" Then
                    .Subject = "QA - *PROCESS FAIL Call Feedback - " & Range("B12") & " - " & Format(Range("B13"), "hh:mm:ss") & " - [" & Range("A38") & "]"
                ElseIf Range("B31") = "Fail" Then
                    .Subject = "QA - *FAILED Call Feedback - " & Range("B12") & " - " & Format(Range("B13"), "hh:mm:ss") & " - [" & Range("A38") & "]"
                ElseIf Range("A40") = "" Then
                    .Subject = "QA - Call Feedback - " & Range("B12") & " - " & Format(Range("B13"), "hh:mm:ss") & " - [" & Range("A38") & "]"
                ElseIf Range("A42") = "" Then
                    .Subject = "QA - Call Feedback - " & Range("B12") & " - " & Format(Range("B13"), "hh:mm:ss") & " - [" & Range("A38") & "]" & " - " & Range("A40") & "]"
                Else
                    .Subject = "QA - Call Feedback - " & Range("B12") & " - " & Format(Range("B13"), "hh:mm:ss") & " - [" & Range("A38") & "]" & " - " & Range("A40") & "]" & " - " & Range("A42") & "]"
                End If
                .Recipients.ResolveAll
             End With
         End With
    Else                                            'Toggle Email if it's been displayed already
        ActiveWorkbook.EnvelopeVisible = False
        'UNHIDE Empty below rows
        Call UNHIDE_EmptyRows_2019("", Range("A3:A4"))
        Call UNHIDE_EmptyRows_2019("", Range("A35:A47"))
        Application.Calculate
    End If
End With
    'Hide Email Template
    'Sheets("E2A4CALL").Visible = False
    'Show ICE audits
    'Sheets("JAN_ICE").Visible = True
End Sub


Sub Back2ICE_Agent_2019()
Windows("ESD_QA_2019.xlsx:1").Activate
Sheets("JAN_ICE").Select
Sheets("E2A4CALL").Visible = False
End Sub

Sub Back2ICE_and_Clear_Agent_2019()
Windows("ESD_QA_2019.xlsx:1").Activate
Call REM_ICE_ResetFilter_2019
Sheets("E2A4CALL").Visible = False
End Sub

Sub ReturnToICE_EmailSentUpdate_2019()
Workbooks("ESD_QA_2019.xlsx").Activate
Windows("ESD_QA_2019.xlsx:1").Activate
Sheets("JAN_ICE").Select
'Call Show_ALL_Cells
'Range("A:A,B:B,E:F,I:L,N:O,Q:S,AM:AP").EntireColumn.Hidden = True
'ActiveWindow.Zoom = 60
'Windows("ESD_QA_2019.xlsx:2").Activate
'Sheets("Progress&Results").Select
'ActiveWindow.Zoom = 68
End Sub