| View previous topic :: View next topic |
| Author |
Message |
martho OOo Enthusiast

Joined: 17 Apr 2004 Posts: 140 Location: Germany
|
Posted: Sat Apr 10, 2010 5:42 am Post subject: Link cells on 2 different sheets reciprocal |
|
|
Hello!
I have 2 sheets in a document like:
Sheet 1: Invoices
1 Invoice 123 from company abc
2 Invoice 987 from company xyz
3 Invoice 222 from company ccc
...
Sheet 2: Payments
1 Payment 100 EUR
2 Payment 200 EUR
...
I need to assign the payments to the invoices. This has to be done manually. But you should be able see automatically if a payment has been assigned to an invoice and vice versa. It's always a 1-to-1 link in my case.
To link Payment 2 to Invoice 3, you could of course do something like:
Sheet1.D3 = Sheet2.A2
and
Sheet2.D2 = Sheet1.A3
... but you have to make 2 steps which are redundant and might lead to errors. Is there a way to do this in 1 step? A problem might be that late invoices and payments can be inserted so it's no option to work with row-numbers as cell-values because they might change. |
|
| Back to top |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1851 Location: Sydney, Australia
|
Posted: Sat Apr 10, 2010 7:44 am Post subject: |
|
|
SUMPRODUCT function tests multiple criteria to determine payment.
With Invoice number in column A, Company name in column B on both sheets and Payment in column C on the second sheet then...
| Code: | | =IF(SUMPRODUCT(Sheet2.A$2:A$65536=A2;Sheet2.B$2:B$65536=B2;Sheet2.C$2:C$65536);"Paid";"Not Paid") | in Sheet1.C2 filled down as far as needed returns "Paid" or "Not Paid" depending on the information on Sheet2 regardless of any sorting.
http://www.4shared.com/file/P72Ulyc_/Show_Payment_Status.html
Ken Johnson _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
|