sum goes from i = 0 to n-1
sum = 3 + 4i
test for n = 501
this is what I have so far, but I get a syntax error on line: sum = sum + 3+4i
Please help. Thank you.Please Login or Register to view this content.
sum goes from i = 0 to n-1
sum = 3 + 4i
test for n = 501
this is what I have so far, but I get a syntax error on line: sum = sum + 3+4i
Please help. Thank you.Please Login or Register to view this content.
Last edited by arlu1201; 09-01-2012 at 04:40 AM.
All you need is a formula:
=2*n^2 + 5*n + 3
EDIT: That's the sum from 0 to n. For 0 to n-1,
=2*n^2 + n
Last edited by shg; 08-31-2012 at 05:28 PM.
Entia non sunt multiplicanda sine necessitate
I tried that but it did not work. I am not sure if I typed it correctly. Also, it is for n= 881, not 501. I got 2 answers with the formulas you provided. The first one 2646 or something like that, and the second one 0. It says that I can verify the output by : s = n(2.3+ 4(n-1))/2
Thank you
B2 and down: =2*A2^2 + 5*A2 + 3Please Login or Register to view this content.
C2 and down: =2*A2^2 + A2
Last edited by shg; 08-31-2012 at 07:45 PM.
Thank you, that is the correct answer. However, I do not know how to input that. Do I define A, B & C?
I am sorry, but this is my second program, and I really do not have idea of what is going on. Thank you for your help.
Hi,
I want to help you fix your syntax error in your VBA code.
You have to use 4*i, not use 4i.Please Login or Register to view this content.
Last edited by Gervie; 09-01-2012 at 12:39 AM.
qcyo,
Welcome to the forum.
I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature.
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
Gervie.Thank you so much! It works now
Last edited by qcyo; 09-01-2012 at 11:51 AM. Reason: include name
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks