I have run this code flawlessly with smaller workbooks, I am getting an overflow error where I try to assign the stressArr(v) values with much larger workbooks.
The array shouldn't have more than ~3800 data points in it (any of the arrays) so I'm not sure why there is an overlow... Any and all help would be appreciated!
NOTE: I left out some code that isnt important to my questions (trust me it isnt necessary and my laziness in those portions of code would only be embarassing lol)
... ' Initialize Variables for Usage Dim loadArr() Dim areaArr() Dim stressArr() Dim strainArr() Dim lengthArr() Dim changeLengthArr() Dim percPosArr() loadArr = WSR.Range("AY267:AY" & TotalRows).Value changeLengthArr = WSR.Range("BF267:BF" & TotalRows).Value maxVal = WorksheetFunction.Max(loadArr()) Area = WSR.[AQ267].Value AreaReal = 1000000 * Area ... ' Arrays of Values for Stress/Strain Calulations ReDim areaArr(LBound(loadArr) To UBound(loadArr)) ReDim stressArr(LBound(loadArr) To UBound(loadArr)) ReDim strainArr(LBound(loadArr) To UBound(loadArr)) ReDim lengthArr(LBound(loadArr) To UBound(loadArr)) ReDim percPosArr(LBound(loadArr) To UBound(loadArr)) For q = LBound(loadArr) To UBound(loadArr) areaArr(q) = AreaReal lengthArr(q) = Length Next q For v = LBound(loadArr) To UBound(loadArr) stressArr(v) = loadArr(v, 1) / areaArr(v) strainArr(v) = (1000 * changeLengthArr(v, 1)) / lengthArr(v) percPosArr(v) = Round((100 * strainArr(v)), 2) WS2.Cells(v, 2).Value = percPosArr(v) WS2.Cells(v, 1).Value = stressArr(v) Next v ...