Sub FPQMETER()
Worksheets("CHART DATA").PivotTables("Pivot_Accountablility").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_FPQ").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_Avg_FPQ").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_OTD").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_Avg_OTD").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_Aggregate").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_Error_Description").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_Efficiency").PivotCache.Refresh
Dim str As String
Dim val As Long
Dim inte As Single
Dim subss As String
Dim Csht As Worksheet
Dim Dsht As Worksheet
Dim Esht As Worksheet
Dim LastRow As Long
Dim LastColumn As Integer
Dim i As Integer
Dim j As Integer
Dim k As Integer
Set Csht = ThisWorkbook.Sheets("CHART DATA")
Set Dsht = ThisWorkbook.Sheets("DASH BOARD")
Set Esht = ThisWorkbook.Sheets("DATA SHEET")
'Sheets("CHART DATA").Select
'Sheets("Sheet1").Select
With Csht
'.Activate
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
'Loop through all the rows of the sheet that contain commands.
For i = 1 To LastRow
LastColumn = .Cells(i, .Columns.Count).End(xlToLeft).Column
For j = 1 To LastColumn
subss = .Cells(i, j).Value
ActiveSheet.Cells(i, j).Select
If subss = "% of FIRST_PASS_QUALITY" Then
k = i
k = k + 1
str = .Cells(k, j).Value
'MsgBox str
'val = str
inte = str * 100
inte = Round(inte, 2)
With Dsht
.Activate 'Sheets("DASH BOARD").Select
ActiveSheet.Shapes.Range(Array("Group 78")).Select
Selection.ShapeRange.Rotation = str * 210
ActiveSheet.Shapes.Range(Array("TextBox 91")).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = inte & "%"
End With
End If
Next j
Next i
End With
Range("A1").Select
With Esht
.Activate
End With
End Sub
Sub OTDMETER()
Worksheets("CHART DATA").PivotTables("Pivot_Accountablility").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_FPQ").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_Avg_FPQ").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_OTD").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_Avg_OTD").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("PivotTable7").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("PivotTable8").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("PivotTable11").PivotCache.Refresh
Dim str As String
Dim val As Long
Dim inte As Single
Dim subss As String
Dim Csht As Worksheet
Dim Dsht As Worksheet
Dim Esht As Worksheet
Dim LastRow As Long
Dim LastColumn As Integer
Dim i As Integer
Dim j As Integer
Dim k As Integer
Set Csht = ThisWorkbook.Sheets("CHART DATA")
Set Dsht = ThisWorkbook.Sheets("DASH BOARD")
Set Esht = ThisWorkbook.Sheets("DATA SHEET")
'Sheets("CHART DATA").Select
'Sheets("Sheet1").Select
With Csht
.Activate
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row 'finding the lastrow of the worksheet.
For i = 1 To LastRow 'Loop through all the rows of the sheet.
LastColumn = .Cells(i, .Columns.Count).End(xlToLeft).Column 'finding the last column of the worksheet.
For j = 1 To LastColumn 'Loop through all the columns of the row.
subss = .Cells(i, j).Value ' gets the value on the respective cell.
'ActiveSheet.Cells(i, j).Select
If subss = "% of ON_TIME_DELIVERY" Then ' checks whether the cell contains the particular text.
k = i
k = k + 1
str = .Cells(k, j).Value
inte = str * 100
inte = Round(inte, 2)
With Dsht
.Activate
'Sheets("DASH BOARD").Select
ActiveSheet.Shapes.Range(Array("Group 46")).Select
Selection.ShapeRange.Rotation = str * 210 ' changes the rotation.
ActiveSheet.Shapes.Range(Array("TextBox 15")).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = inte & "%" ' changes the content of the text box.
End With
End If
Next j
Next i
End With
Range("A1").Select
With Esht
.Activate
End With
End Sub
Sub EFFMETER()
Worksheets("CHART DATA").PivotTables("Pivot_Accountablility").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_FPQ").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_Avg_FPQ").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_OTD").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("Pivot_Avg_OTD").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("PivotTable7").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("PivotTable8").PivotCache.Refresh
Worksheets("CHART DATA").PivotTables("PivotTable11").PivotCache.Refresh
Dim str As String
Dim val As Long
Dim inte As Single
Dim subss As String
Dim Csht As Worksheet
Dim Dsht As Worksheet
Dim Esht As Worksheet
Dim LastRow As Long
Dim LastColumn As Integer
Dim i As Integer
Dim j As Integer
Dim k As Integer
Set Csht = ThisWorkbook.Sheets("CHART DATA")
Set Dsht = ThisWorkbook.Sheets("DASH BOARD")
Set Esht = ThisWorkbook.Sheets("DATA SHEET")
'Sheets("CHART DATA").Select
'Sheets("Sheet1").Select
With Csht
.Activate
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row 'finding the lastrow of the worksheet.
For i = 1 To LastRow 'Loop through all the rows of the sheet.
LastColumn = .Cells(i, .Columns.Count).End(xlToLeft).Column 'finding the last column of the worksheet.
For j = 1 To LastColumn 'Loop through all the columns of the row.
subss = .Cells(i, j).Value ' gets the value on the respective cell.
'ActiveSheet.Cells(i, j).Select
If subss = "AVERAGE EFFICIENCY" Then ' checks whether the cell contains the particular text.
k = i
k = k + 1
str = .Cells(k, j).Value
inte = str * 100
inte = Round(inte, 2)
With Dsht
.Activate
'Sheets("DASH BOARD").Select
ActiveSheet.Shapes.Range(Array("Group 152")).Select
Selection.ShapeRange.Rotation = (str / 2) * 210 ' changes the rotation.
ActiveSheet.Shapes.Range(Array("TextBox 172")).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = inte & "%" ' changes the content of the text box.
End With
End If
Next j
Next i
End With
Range("A1").Select
With Esht
.Activate
End With
End Sub