100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
AIN3701 Assignment 2 2025 - DUE 13 June 2025 $2.97
Add to cart

Exam (elaborations)

AIN3701 Assignment 2 2025 - DUE 13 June 2025

1 review
 3 purchases
  • Course
  • Institution

AIN3701 Assignment 2 2025 (721274) - DUE 13 June 2025 ;100% TRUSTED workings with detailed Answers for A+ Grade.

Preview 3 out of 19  pages

  • June 4, 2025
  • 19
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers

1  review

review-writer-avatar

By: kevinmodise • 2 weeks ago

avatar-seller
AIN3701
ASSIGNMENT 2 SEMESTER 1 2025

UNIQUE NO. 721274
DUE DATE: 13 JUNE 2025

,AIN3701 Assignment 2 2025

QUESTION 1(a): VBA Function Procedure

Open the Bookings_Feb_2025.xlsx file, press ALT + F11 to access the VBA editor, then
insert a new module and paste the following:

'Student Number: 12345678
'AIN3701 Assignment 2 – Question 1(a)
Option Explicit


Public Function CalculateRevenue(ByVal Destination As String, ByVal Category As
String) As Double
Const CPT_ADULT As Double = 1800
Const CPT_CHILD As Double = 1350
Const DBN_ADULT As Double = 1500
Const DBN_CHILD As Double = 1125
Const WIND_ADULT As Double = 3500
Const WIND_CHILD As Double = 2625


Select Case Destination
Case "Cape Town"
If Category = "Adult" Then
CalculateRevenue = CPT_ADULT
ElseIf Category = "Child" Then
CalculateRevenue = CPT_CHILD
End If
Case "Durban"
If Category = "Adult" Then
CalculateRevenue = DBN_ADULT
ElseIf Category = "Child" Then

, CalculateRevenue = DBN_CHILD
End If
Case "Windhoek"
If Category = "Adult" Then
CalculateRevenue = WIND_ADULT
ElseIf Category = "Child" Then
CalculateRevenue = WIND_CHILD
End If
Case Else
CalculateRevenue = 0
End Select
End Function
QUESTION 1(b): VBA Sub Procedure

Paste this below the function in the same module:

'AIN3701 Assignment 2 – Question 1(b)
Sub RecalculateTicketRevenue()
Dim ws As Worksheet
Dim lastRow As Long
Dim i As Long
Dim destination As String
Dim category As String
Dim quantity As Long
Dim correctRevenue As Double
Dim recordedRevenue As Double
Dim priceDifference As Double


Set ws = ThisWorkbook.Sheets("Sheet1") 'Assuming the data is in Sheet1
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row


ws.Cells(1, 7).Value = "Correct Revenue"

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller StudyAidPro. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $2.97. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

65496 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 15 years now

Start selling
$2.97  3x  sold
  • (1)
Add to cart
Added