Hi,
I have an array with values for 10 cities for 5 years, years 2020,2021, 2022, 2023,2024 and 2025.
I want to find the cities with the highest change (in absolute numbers and percentage) year to year and also from year 2020 to year 2025.
I have my data in a range.
I am then using the following code to loop through the values of the different years.
Where do I start to find the change in actual numbers year from year? How do I calculate the change in percentage?
I want to keep the values in the array and then at the end redim the array into my sheet.
I have an array with values for 10 cities for 5 years, years 2020,2021, 2022, 2023,2024 and 2025.
I want to find the cities with the highest change (in absolute numbers and percentage) year to year and also from year 2020 to year 2025.
I have my data in a range.
VBA Code:
data = Sheets("Data").Range("AR26").CurrentRegion.Value
I am then using the following code to loop through the values of the different years.
VBA Code:
Dim idxCol As Integer, idxRow As Long
For idxCol = 2 To 6
For idxRow = LBound(data, 1) To UBound(data, 1)
area = data(idxRow, 1)
aval = data(idxRow, idxCol)
Next idxRow
Application.Wait (Now + TimeValue("00:00:02"))
Next idxCol
Where do I start to find the change in actual numbers year from year? How do I calculate the change in percentage?
I want to keep the values in the array and then at the end redim the array into my sheet.