View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Conor Finnegan Conor Finnegan is offline
external usenet poster
 
Posts: 2
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