Hi Gurus,
Could anybody help me in writing a simple macro to sumup values as mentioned in the example.
A B C
1 4 5 176
2 693 6
3 1067 56 1492
4 1068 109
5 1079 694
6 1089 798
Here results are marked in RED color. This is how the logic should be
Cell C1 = ( 5+6+56+109)
C3 = (694+ 798)
Logic is simple , it goes through the row B , for each value it compares with the values of Row A .
For example , 5> 4 so goes to the second value in Row A
5<693 so puts 5 in the loop
6<693 so puts 6 in the loop
56< 693 so puts 56 in the loop
109< 693 so puts 109 in the loop
but being 694> 693 adds all the values in the loop ( 5+6+56+109) and puts that in the cell C1
And so on......
Your help is really appreciated.... and indebted
Thank you very much
Could anybody help me in writing a simple macro to sumup values as mentioned in the example.
A B C
1 4 5 176
2 693 6
3 1067 56 1492
4 1068 109
5 1079 694
6 1089 798
Here results are marked in RED color. This is how the logic should be
Cell C1 = ( 5+6+56+109)
C3 = (694+ 798)
Logic is simple , it goes through the row B , for each value it compares with the values of Row A .
For example , 5> 4 so goes to the second value in Row A
5<693 so puts 5 in the loop
6<693 so puts 6 in the loop
56< 693 so puts 56 in the loop
109< 693 so puts 109 in the loop
but being 694> 693 adds all the values in the loop ( 5+6+56+109) and puts that in the cell C1
And so on......
Your help is really appreciated.... and indebted
Thank you very much