Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

GDocs spreadsheets, how to do selective sums

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?

Name: Anonymous 2012-04-26 8:15

meh, solved, I used UNIQUE with the dates and SUMIF to sum the money and it worked like a charm.

Name: Anonymous 2012-04-26 13:35

google docs

Lol.

I'm creating a spreadsheet [...] to keep track of how much money my gf owes me.

The relationship is already over.

Name: Anonymous 2012-04-26 13:37

>>1
plain text file motherfucker

Name: Anonymous 2012-04-30 7:11

>>4
Because a flat file and scads of Perl/awk snippets is a much more maintainable solution.

Any serious answers (that don't involve writing you own DB font-end, thanks very much)?

Name: Anonymous 2012-04-30 8:12

>>5
It's tragic when people deride the truth with self-righteous sarcasm. The correct answer is indeed a plain text file, plus one script that outputs crap to GNUplot, and (if you're the sort of person who doesn't have the requisite working knowledge of awk, which I'm guessing you are) one script to calculate the total.

Name: Anonymous 2012-04-30 11:13

is your gf a meth junkie?

Name: Anonymous 2012-04-30 11:55

>>5
Serious answers to what? The problem >>1 solved himself?

Name: Anonymous 2012-05-02 4:58

sure is

Name: bampu pantsu 2012-05-29 4:38

bampu pantsu

Don't change these.
Name: Email:
Entire Thread Thread List