Name: Anonymous 2012-04-26 5:48
Hey guys,
I'm creating a spreadsheet in google docs to keep track of how much money my gf owes me. I want to make a chart to see how the total changes through time.
In column A I have the date of an event and in column B the money spent (positive if I pay, negative if she pays). There may be several events for a given date.
In column C I want to put dates again, but without repetition, and in column D the sum of all the transactions of column B.
Pseudocode:
j=1
C[1]=A[1]
for i in 1..Nrows
if A[i]==C[j]
D[j]+=B[i]
else
j++
C[j]=A[i]
D[j]+=B[i]
end if
end for
How the hell do I do that in GDocs?
I'm creating a spreadsheet in google docs to keep track of how much money my gf owes me. I want to make a chart to see how the total changes through time.
In column A I have the date of an event and in column B the money spent (positive if I pay, negative if she pays). There may be several events for a given date.
In column C I want to put dates again, but without repetition, and in column D the sum of all the transactions of column B.
Pseudocode:
j=1
C[1]=A[1]
for i in 1..Nrows
if A[i]==C[j]
D[j]+=B[i]
else
j++
C[j]=A[i]
D[j]+=B[i]
end if
end for
How the hell do I do that in GDocs?