PDA

View Full Version : SumIf in vba returns 0 value in userform



djemy1975
02-29-2016, 03:56 AM
Dear firends,

I have a userform "frmSuivi" in which I want to display some calculations ,among them count and sumif

I have set up the functions for those calculations but the result is "0".I think the problem is related to numbers format in the sheet ,knowing that the data is entered via another userform.I could not figure out how to get this problem over .

Could someone help me to go through.

Herewith my file for applying any changes you may see suitable.

Thanks in advance,

mancubus
02-29-2016, 05:35 AM
i think your table is imported from another application.

the values in Col E are 'numbers stored as text' and you should convert then to numbers. also Col F contains texts rather thna dates.

values in Cols I J J should also be converted to numbers by removing Chr(160)'s (non-breaking-spaces) which seemed to be used as thousands delimeters.


http://www.vbaexpress.com/forum/showthread.php?40188-How-can-I-find-character-with-ASCII-code-160-in-a-string-using-VBA