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

html - height not adding height to a empty div -

angularjs - Redirect to a new template in angular js -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -