Hi First time here and first time to any vba or coding forum. Been programming for 12 years now, mostly in VBA and C and this is the first time I've looked for help.
Its something so simple, yet for some reason I am not getting the results I expect. Hoping some of you could provide some insight.
I have a simple function that breaks down data into "Pie Slices" - percentages of the whole. To ensure I'm not losing information, I created a test to see if my Pie Slices total 100% (or 1). The Code is as follows:
The test is:
It started out simpler than that as
, but a value of 1 would prompt the msgbox, so I broke it down. Pretty much, a value of 1 may or may not fail the less than test. It is not consistent. I feel that data is being lost, but the rounding of the values should prevent that, shouldn't it?
Bookmarks