PCR Analysis Vba Module
PCR Analysis Vba Module
Value
wsAnalysis.Cells(31 + i, 1).NumberFormat = "dd-mmm-yyyy hh:mm"
' Signal
Dim rowPCR As Double
rowPCR = wsData.Cells(startRow + i, 3).Value
Sub CreatePCRTrendChart()
' Creates or updates the PCR trend chart
Dim wsAnalysis As Worksheet
Dim wsData As Worksheet
Sub ApplyConditionalFormattingToPCR()
' Applies conditional formatting to PCR values
With wsAnalysis.Range("B5").FormatConditions.Add(Type:=xlCellValue,
Operator:=xlLess, Formula1:="0.8")
.Interior.Color = RGB(198, 239, 206) ' Light green
End With
With wsAnalysis.Range("B6").FormatConditions.Add(Type:=xlCellValue,
Operator:=xlLess, Formula1:="0.8")
.Interior.Color = RGB(198, 239, 206) ' Light green
End With
With wsAnalysis.Range("B31:B45").FormatConditions.Add(Type:=xlCellValue,
Operator:=xlLess, Formula1:="0.8")
.Interior.Color = RGB(198, 239, 206) ' Light green
End With
With wsAnalysis.Range("C31:C45").FormatConditions.Add(Type:=xlCellValue,
Operator:=xlLess, Formula1:="0.8")
.Interior.Color = RGB(198, 239, 206) ' Light green
End With
End Sub
Sub AssignRefreshButtonMacro()
' Assigns the refresh macro to the refresh button text cell
shapeExists = False
For Each shp In wsAnalysis.Shapes
If shp.Name = "RefreshButton" Then
shapeExists = True
Exit For
End If
Next shp
Dim ws As Worksheet