Hello friends.
I am going to write a code on VBA that calculates the sum of squares of odd numbers from 1 up to 20.
I would be glad to see your messages.
Thanks
Hello friends.
I am going to write a code on VBA that calculates the sum of squares of odd numbers from 1 up to 20.
I would be glad to see your messages.
Thanks
OrPlease Login or Register to view this content.
=SUMPRODUCT(A1:A10*A1:A10)
numbers in A1;A10
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
I notice John assumes that this is an exercise for practicing writing loops. I would note that, as with many arithmetic progressions, the sum of odd numbers has a very simple formula -- the sum of the first n odd numbers is n^2. So, the sum of the first 10 (1 to 19) is 100. Proof here: https://www.cuemath.com/algebra/sum-of-odd-numbers/ I'll assume for now that you can program that into VBA (or any other programming language you choose to use).
Originally Posted by shg
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks