Dear Lutfor,
About the last VBA Code you provide to find the SubArray Range in Column N
such that the Corresponding SubArray Range Sum is Maximum in Column O,
I found out that for the same values in Column N, it will ignore the Negative
Values in Column N to get the Max Value SubArray in Column O. For example,
enclosed the 2023NBADEMY.xlsm File, Title “RDF(H-V)” in Column N, Title
“MDOG 4W” in Column O, running the VBA Code it shows that in RDF(H-V)
From 1.700 to 7.300 it will get the Max Sum +4777.48, but it ignores the same
6 elements of 1.700 above it which all gives -100 values in Column O, it also
ignores 1 element of the same 7.300 below it which gives -100 in Column O.
So the Max Sum should be +4777.48 – 7*100 = +4077.48 which is not the
true Max Sum because I just guess a range in Column N from -8.20 to +7.30,
the corresponding Max Sum in Column O is +4554.48 larger than +4077.48.
I am sure my guess is wrong, it is just guessing, there should be a range that
gives the true Max Sum greater than my guess Sum of +4554.48. Could you
modify the VBA Code which include ALL range elements to give the real true
Max Sum? To clear and simplify things, could you in the result statement just
mention in Column N or in Column O, don’t mention the Title names since I
may use different Title names in the future. Thanks,
Boy282828 4/26/2024
About the last VBA Code you provide to find the SubArray Range in Column N
such that the Corresponding SubArray Range Sum is Maximum in Column O,
I found out that for the same values in Column N, it will ignore the Negative
Values in Column N to get the Max Value SubArray in Column O. For example,
enclosed the 2023NBADEMY.xlsm File, Title “RDF(H-V)” in Column N, Title
“MDOG 4W” in Column O, running the VBA Code it shows that in RDF(H-V)
From 1.700 to 7.300 it will get the Max Sum +4777.48, but it ignores the same
6 elements of 1.700 above it which all gives -100 values in Column O, it also
ignores 1 element of the same 7.300 below it which gives -100 in Column O.
So the Max Sum should be +4777.48 – 7*100 = +4077.48 which is not the
true Max Sum because I just guess a range in Column N from -8.20 to +7.30,
the corresponding Max Sum in Column O is +4554.48 larger than +4077.48.
I am sure my guess is wrong, it is just guessing, there should be a range that
gives the true Max Sum greater than my guess Sum of +4554.48. Could you
modify the VBA Code which include ALL range elements to give the real true
Max Sum? To clear and simplify things, could you in the result statement just
mention in Column N or in Column O, don’t mention the Title names since I
may use different Title names in the future. Thanks,
Boy282828 4/26/2024