View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default VBA Code to Round Range & Not Exceed 100

I've got a file with roughly 100 rows of data in about 15 columns.
For each row, I've got two ranges (one 10 columns) and another (5)
columns that have %'s totaling 100% for each of the ranges.

I know I can use the round function to ROUND the range, but then I
occasionally get a number when I sum that range greater than 100 or
less than 100. Is there is a VBA code to check each of the ranges,
round the values to 0 decimal places, but not exceed 100. I'm not
against adding/subtracting from the largest value in that range.
Then when done, move on to the next row through the bottom of the
sheet.

Thanks in advance for your help with this. Appreciate it.

ConorFinnegan


Sounds to me like you're doing 'weighted' scoring. If so, please
elaborate...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion