Why am I getting Overflow Error? VBA EXCEL
Why do I get this “Overflow” error when trying to output certain results towards the Excel file?
'calculating the total CGs across all of the bays
For ii = 1 To bayCount
.cells(bayCount + 2, 3) = .cells(bayCount + 2, 3) + .cells(ii + 1, 2) * .cells(ii + 1, 3)
.cells(bayCount + 2, 4) = .cells(bayCount + 2, 4) + .cells(ii + 1, 2) * .cells(ii + 1, 4)
.cells(bayCount + 2, 5) = .cells(bayCount + 2, 5) + .cells(ii + 1, 2) * .cells(ii + 1, 5)
Next ii
.cells(bayCount + 2, 3) = .cells(bayCount + 2, 3) / .cells(bayCount + 2, 2)
.cells(bayCount + 2, 4) = .cells(bayCount + 2, 4) / .cells(bayCount + 2, 2)
.cells(bayCount + 2, 5) = .cells(bayCount + 2, 5) / .cells(bayCount + 2, 2)
What I’m looking for is just to get the results from the previous calculations and fill the excel sheet. I was told that it could be the size of the numbers that might be exceeding the limits.
Read more here: Source link
