You are on page 1of 1

Option Explicit

Sub quiz2()

‘Writing to excel cells number E3,F3 and G3


[E3] = "v"
[F3] = "t"
[G3] = "Q"

‘Declaring each variable used in the program as Double data types


Dim v As Double
Dim t As Double
Dim Q As Double

‘Reading existing data from excel cell numbers E4 and F4 and assigning the data to v and t
v = [E4]
t = [F4]

‘calculating volume flow rate(Q) and writing the answer to cell number G4
Q=v/t
[G4] = Q

‘Writing to excel cells number E3,F3 and G3


[F1] = "Easy"

End Sub

You might also like