# Cumulative Frequency error uncertainty

1. ## Cumulative Frequency error uncertainty

Hi Guys,
Ive got a list of numbers and im trying to fund the uncertainty. Im having trouble writing the code. If the column had the values A, B, C, D .... The value to the right of A would equal A. The value to the right of B = sqrt(A^2 +B^2), the value to the right of C = sqrt(A^2 +B^2 + C^2) and so on. Can someone help me to do this. Heres what I have so far: ``Please Login or Register  to view this content.``  Register To Reply

2. ## Re: Cumulative Frequency error uncertainty

Perhaps a formula based proposal will help:
Paste the following into cell C3: =SQRT(SUMPRODUCT((\$A3:B3)*(\$A3:B3)))
Drag the fill handle to the right.
Let us know if you have any questions.  Register To Reply

3. ## Re: Cumulative Frequency error uncertainty Originally Posted by jpe1 If the column had the values A, B, C, D
The value to the right of A would equal A.
The value to the right of B = sqrt(A^2 +B^2),
the value to the right of C = sqrt(A^2 +B^2 + C^2) and so on
I am having difficulty reconciling your abstract description with the VBA code snippet that starts with N12.

Why not describe what you want with actual cell references, starting with M12(?) instead "A"?

Your code snippet does the following:

\$N\$12 = (\$M\$12^2 + \$N\$11^2)^0.5
\$N\$13 = (\$M\$13^2 + \$N\$12^2)^0.5
\$N\$14 = (\$M\$14^2 + \$N\$13^2)^0.5
[...etc...]

Nothing like SQRT(A^2 + B^2 + C^2 +...), as I (mis?)understand your description.

I wonder if the following does what you want, using Excel instead of VBA. (Do you need a VBA implementation?)

Enter the following formula into N12 ("to the right of" M12) and copy N12 into N13, N14, etc ("to the right of" M13, M14, etc):

=SQRT(SUMSQ(\$M\$12:M12))  Register To Reply