![]() |
Adding in loop
I have a macro that now adds in a strange fashion. It used to work but now
for some reason the adding in one loop is wrong. When there are decimal numbers in the cells that the loop is to add the program just puts them together so that there are several decimal commas. The code is: For l = 1 To i - 1 dblSumMarketValue = dblSumMarketValue + rng5.Offset(l, 0).Value Next For l = 1 To i - 1 dblSumMarketValueBench = dblSumMarketValueBench + rng6.Offset(l, 0).Value Next The last loop is the one having the problem. It used to work but now it just puts the number together. The contents of the cells are pasted in from another program and are then checked by a function that remove blanks (dont know if that has any impact..). Please help me if you can! |
All times are GMT +1. The time now is 09:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com