I have a data table with cities, build year, number of seats, need for seats and the current number of seats.
I am trying to calculate in what year a company should build sports arenas and in what city. I have read about static arrays and I know the size of my array.
However, I am not sure where to begin with how to manipulate the array.
Step1. Load range into an array
Step2. Sort array in the correct order (ex. 2011, 2016, 2020, 2025, etc).
Step3. Calculate the need for seats minus the number of seats being built in the corresponding year
Step4. Return result to a spreadsheet
Desired output:
We should build 2000 seats in City5 in the year 2027.
Data table:
I am trying to calculate in what year a company should build sports arenas and in what city. I have read about static arrays and I know the size of my array.
However, I am not sure where to begin with how to manipulate the array.
Step1. Load range into an array
Step2. Sort array in the correct order (ex. 2011, 2016, 2020, 2025, etc).
Step3. Calculate the need for seats minus the number of seats being built in the corresponding year
Step4. Return result to a spreadsheet
Desired output:
We should build 2000 seats in City5 in the year 2027.
Data table:
Code:
[I]Column 2 3 4 5 6 [/I]
Number City Need for seats Build year Seats being built Current number of seats
1 City1 1500 2020 2500 2500
2 City2 7500 2022 5500 4500
3 City3 8500 2023 4500 5500
4 City4 3500 2024 3500 6500
5 City5 2500 2026 7500 8500
Last edited: