excel - Overflow in addition -


string = string b + string c 

where string b , c numbers stored in form of text , string should contain sum of both , not concatenate both, does, used,

string a= cint(string b) + cint( string c) 

it throws overflow error. enjoy weekend.

cint converts integer type, throw overflow exception if result greater 32767

use cdbl (or clng) instead of cint convert string values double

dim string,b string, c string a="1234567" b="9876543" c=cdbl(a)+cdbl(b) 

Comments

Popular posts from this blog

methods - python can't use function in submodule -

Java 3D LWJGL collision -

c# - ErrorThe type or namespace name 'AxWMPLib' could not be found (are you missing a using directive or an assembly reference?) -