Advertisement
This is comment for paste
Conditional Statements – More Exercises - Solutions
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In 10. Area of Figures again missing formating in results:
- Sub Area_Of_Figures()
- Dim figureType As String
- figureType = Range("A1").Value
- Select Case figureType
- Case "square"
- Dim side As Double
- side = Range("A2").Value
- With Range("A4")
- .Value = side * side
- .NumberFormat = "0.00"
- End With
- Case "rectangle"
- Dim width As Double, length As Double
- width = Range("A2").Value
- length = Range("A3").Value
- With Range("A4")
- .Value = width * length
- .NumberFormat = "0.00"
- End With
- Case "circle"
- Dim radius As Double
- radius = Range("A2").Value
- Range("A4").Value = WorksheetFunction.Pi() * radius * radius
- With Range("A4")
- .Value = WorksheetFunction.Pi() * radius * radius
- .NumberFormat = "0.00"
- End With
- End Select
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement