Hi to all.
I'm making some calculations based on a multi array and i wanted to subtract two arrays but i cannot seem to accomplish that without an expensive loop. Here is my code:
I wanted to create a New Array with the subtraction between ArrArrayX and ArrArrayY. Is this possible without looping the two arrays (maybe using Excel library). Thanks for any help.
I'm making some calculations based on a multi array and i wanted to subtract two arrays but i cannot seem to accomplish that without an expensive loop. Here is my code:
Code:
Dim TrainingResults as DAO.Recordset
Dim NormalizedPricesArray As Variant
Dim ArrArrayX As Variant
Dim ArrArrayY As Variant
Dim RecordsCount as Integer
Set TrainingResults = CurrentDb.OpenRecordset("TrainingResults", dbOpenDynaset)
TrainingResults .MoveLast
RecordsCount = TrainingResults .RecordCount
TrainingResults .MoveFirst
NormalizedPricesArray = TrainingResults.GetRows(RecordsCount)
TrainingResults.Close
Set TrainingResults = Nothing
ArrArrayX = Excel.WorksheetFunction.Index(NormalizedPricesArray, 1)
ArrArrayY = Excel.WorksheetFunction.Index(NormalizedPricesArray, 2)
I wanted to create a New Array with the subtraction between ArrArrayX and ArrArrayY. Is this possible without looping the two arrays (maybe using Excel library). Thanks for any help.