Present value of one future cash flow
///////////////////////////////////////////

  Present value of one future cash flow

 1) what is the formula?

 2) What is the corresponding Excel function

  What is the equivalent present value for $500 received
     in 4 years with a 2.5% annual discount rate?

///////////////////////////////////////////

Macro 4 clean
/////////////////////////

Sub clean()
    Range("A1:N31").Select
    Selection.Delete Shift:=xlToLeft
    Range("A1").Select
End Sub




 Note: to link Ctrl-d   to this macro, see c27(7)
       to link a buttom to this macro, see c27(14)

/////////////////////////

Macro 4 hiding columns 
/////////////////////////

Sub hideColumns()
    Columns("B:F").Select
    Selection.EntireColumn.Hidden = True
End Sub


/////////////////////////

Macro 4 unhide columns 
/////////////////////////

Sub unhide()
    Columns("A:P").Select
    Selection.EntireColumn.Hidden = False
End Sub

/////////////////////////

Macro 4 hide rows
/////////////////////////

Sub hideRows()
    Rows("2:9").Select
    Selection.EntireRow.Hidden = True
End Sub

/////////////////////////

Macro 4 unhide rows
/////////////////////////

Sub unhideRows()
    Rows("2:9").Select
    Selection.EntireRow.Hidden = False
End Sub

/////////////////////////

Macro 4 creating a pie 
/////////////////////////

Sub PieB5B10()
  Dim cht As Object
  Set cht = ActiveSheet.ChartObjects.Add(Left:=300, Width:=300, Top:=10, Height:=300)
  With cht
  .Chart.SetSourceData Source:=Sheets("Sheet1").Range("B5:B10")
  .Chart.Type = xlPie
  End With
End Sub

/////////////////////////

Macro: add 10 
/////////////////////////
Step 1: generte a column of value
Step 2: move the cursor to the first value
Step 3: run the following macro


Sub addTen()
 
 Do While IsEmpty(ActiveCell.Offset(0, -1)) = False
   Dim ticker As String
   Value = ActiveCell.Offset(0, -1).Value
   If IsEmpty(Value) = True Then
      MsgBox "Done!!!"
   Else:
       ActiveCell.Value = Value + 10
       ActiveCell.Offset(1).Select
   End If
 Loop
  
End Sub

/////////////////////////