I have the following code where I pick a value from a named range and store it in a variable declared as a Double. Later on, after changing the variable or not I want to reassign it to the named range. But here I get an Overflow error. The error disappears if I change the variable into an Integer. For information, I am working on a Mac.
'''
Dim maxDepth As Double
i=0
Do Until Range("scopeID").offset(i, 0) = ""
maxDepth = Range("currentDepth").offset(i, 0)
' some code here that possibly changes the value based on some conditions
Range("currentDepth").offset(i, 0) = maxDepth
i = i + 1
Loop
'''