danbrawl93
New Member
- Joined
- Dec 15, 2016
- Messages
- 17
Hey guys,
I'm having a real issue with some code that isn't working!
The variables "value" & "value_2" are set to be integers. However, I seem to keep getting an overflow error for no obvious reason at certain points (e.g. when value = 20000 & value_2 = 15000). I know this is a vague question, but does anyone have any idea what the problem is at this stage? All the variables are correct in terms of the value which they should be.
Thanks so much!
I'm having a real issue with some code that isn't working!
Code:
For c = r_start To r_end
If z <> 7 Then
value = Evaluate("=SumProduct((A7:A" & z - 1 & " = A" & c & ")*(Numbervalue(" & column_letter & "7:" & column_letter & z - 1 & ")))")
Else: value = 0
End If
If x <> (n + 1) Then
value_2 = Evaluate("=SumProduct((A" & n + 1 & ":A" & x - 1 & " = A" & c & ")*(Numbervalue(" & column_letter & "" & n + 1 & ":" & column_letter & "" & x - 1 & ")))")
Else: value_2 = 0
End If
Cells(c, 2).value = value + value_2
Next c
Thanks so much!
Last edited by a moderator: