Create arrows to denote Increase\Decrease

     

  • Add UP or DOWN ARROWS when Increase or decrease happened when compare with previous period
  •  

  • Provide "="., when data having equivalent status with previous period
  •  

     

    Download The Workbook

    Private Sub CommandButton1_Click()

    Dim sh As Shape

    Columns("C").Delete
    Columns("C").EntireColumn.Insert

    Range("C1").Value = "Add Symbol"
    Dim max As Integer
    max = Range("A2").End(xlDown).Row

    For i = 2 To max
    Range("C" & i).Select

    If Range("A" & i).Value > Range("B" & i).Value Then
    Set sh = Shapes.AddShape(Type:=msoShapeDownArrow, _
    Left:=Range("C" & i).Left, _
    Top:=Range("C" & i).Top, _
    Width:=15, _
    Height:=13)
    sh.ShapeStyle = msoShapeStylePreset38

    ElseIf Range("A" & i).Value < Range("B" & i).Value Then
    Set sh = Shapes.AddShape(Type:=msoShapeUpArrow, _
    Left:=Range("C" & i).Left, _
    Top:=Range("C" & i).Top, _
    Width:=15, _
    Height:=13)
    sh.ShapeStyle = msoShapeStylePreset39

    ElseIf Range("A" & i).Value = Range("B" & i).Value Then
    Set sh = Shapes.AddShape(Type:=msoShapeMathEqual, _
    Left:=Range("C" & i).Left, _
    Top:=Range("C" & i).Top, _
    Width:=15, _
    Height:=13)
    sh.ShapeStyle = msoShapeStylePreset36

    End If
    Next
    Columns("c").AutoFit
    End Sub