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

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -