all files are located in a different path
vba macro will be placed in a seperate file
this macro
We have to look at S10 value, how much value S10 has
after knowing the S10 value, we will start adding the data in column Q till we reached the S10 value(or till we reach the value near to S10)But not greater than S10
example
in this sample file
S10 value is 1000
So we will add the value of column Q , So From Q2 to Q6 the total value is reached to 989.575 (close to S10 value 1000)
If We add the data ahead, then from Q2 TO Q7 the total value is 1061.53, Since it is greater than the value of S10 ,we cant consider Q2 to Q7
So we consider Q2 TO Q6(which is near to S10 , but not greater than S10 value)
Since we consider the Q2 to Q6, then we will put a remark in column J as 1(Since we consider the Q2 TO Q6 then we will put a remark in J2 to J6 as 1)
Column J is the result that i need when i ran the macro
So Plz have a look and do needful
Bookmarks