Wednesday 15 August 2012

vba - Check multiple columns for values then perform operations on them -


I have an Excel sheet with values ​​in the range of E10: 1610 and if cell J5 is equal to "yes" So I want to use VBA to check the whole range of columns for values ​​above 10. Add all these values ​​together and get a total of 5%. The difficult part comes here ... if a value is more than 20, then we'll consider that value to be 20. If I come in a value like 21, or 35, then I will explain that value to 20. So for example if I think, 11,13,17,29,23, I would calculate 5% of 11 + 13 + 17 + 20 + 20. Any help would be greatly appreciated ...

No need for VBA

 <5> "I , "> = 20"), "")   

Checks for what it does> is test = 10 and & lt; 20, then yoga x 0. 05 Those entries are also counted which are 20 or more and add a total. Due to being 20% ​​5% is 1, the counting works.

No comments:

Post a Comment