xlsvbah6.3

Attribute VB_Name = "mod3Antwoorden"

Sub berekenOmtrek()

'   Opdracht 1: breid oefening 1 uit zodat de rijen t/m 6 worden aangevuld
    
    Range("C2").Value = 2 * Range("A2").Value + 2 * Range("B2").Value
    Range("C3").Value = 2 * Range("A3").Value + 2 * Range("B3").Value
    Range("C4").Value = 2 * Range("A4").Value + 2 * Range("B4").Value
    Range("C5").Value = 2 * Range("A5").Value + 2 * Range("B5").Value
    Range("C6").Value = 2 * Range("A6").Value + 2 * Range("B6").Value

End Sub

Sub berekenDollar()
    
'   Opdracht 2: idem oefening 2
    
    Range("F2").Value = Range("E2").Value * 1.16
    Range("F2").Style = "Currency"
    
    Range("F3").Value = Range("E3").Value * 1.16
    Range("F3").Style = "Currency"
    
    Range("F4").Value = Range("E4").Value * 1.16
    Range("F4").Style = "Currency"
    
    Range("F5").Value = Range("E5").Value * 1.16
    Range("F5").Style = "Currency"
    
    Range("F6").Value = Range("E6").Value * 1.16
    Range("F6").Style = "Currency"

End Sub

Sub berekenTijdOpd3()

'   Opdracht 3: idem oefening 3

    Range("J2").Value = Range("I2").Value - Range("H2").Value
    Range("J2").NumberFormat = "h:mm"
    
    Range("J3").Value = Range("I3").Value - Range("H3").Value
    Range("J3").NumberFormat = "h:mm"
    
    Range("J4").Value = Range("I4").Value - Range("H4").Value
    Range("J4").NumberFormat = "h:mm"
    
    Range("J5").Value = Range("I5").Value - Range("H5").Value
    Range("J5").NumberFormat = "h:mm"
    
    Range("J6").Value = Range("I6").Value - Range("H6").Value
    Range("J6").NumberFormat = "h:mm"

End Sub
Sub berekenTijdOpd4()

'   Opdracht 4: zorg bij opdracht 3 dat van de eindtijd nog eens 30 minuten wordt afgetrokken

    Range("J2").Value = Range("I2").Value - Range("H2").Value - 1 / 24 / 2
    Range("J2").NumberFormat = "h:mm"
    
    Range("J3").Value = Range("I3").Value - Range("H3").Value - 1 / 24 / 2
    Range("J3").NumberFormat = "h:mm"
    
    Range("J4").Value = Range("I4").Value - Range("H4").Value - 1 / 24 / 2
    Range("J4").NumberFormat = "h:mm"
    
    Range("J5").Value = Range("I5").Value - Range("H5").Value - 1 / 24 / 2
    Range("J5").NumberFormat = "h:mm"
    
    Range("J6").Value = Range("I6").Value - Range("H6").Value - 1 / 24 / 2
    Range("J6").NumberFormat = "h:mm"

End Sub

Download hier het bestand.