Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I want to write a formula where I can add values to a cell whether another cell states approves the "transaction".

It will be easier to explain with an example. Consider a spreadsheet containing the costs of a flat share.

Purchase    Adam Joe Peter To
 x           $5  $5   $0   Peter
 y           $0  $7   $7   Adam

Given the table above, I would like to create another table showing how much money do people owe each other:

      Owe to
      Adam  Joe  Peter
Adam   $0    $0   $5
Joe    $7    $0   $5
Peter  $7    $0   $0

I am not sure how to create the second table. Any ideas how? I was thinking of something along the lines of a loop, and if statements.

share|improve this question
    
Can you share a doc with us? –  Jacob Jan Tuinstra Feb 5 '13 at 21:01

1 Answer 1

If you're thinking about "loop and if statements", you should look into Google Apps Scripts.

Other than that, it seems you're looking for the TRANSPOSE function, in conjunction with the FILTER function. Take a look at the Google Spreadsheets Function List.

If you can tell me the purpose of the Purchase column in your example, I might be able to set up a working example.

share|improve this answer
    
the Purchase column is simply a description of a purchase in the flat - its not directly relevant to the question. For example, Peter buys x, and it costs him $15 - so Adam and Joe each owe him $5. This is reflected in the Owe To table (the one I am trying to build). –  Newton Oct 22 '12 at 15:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.