OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Link cells on 2 different sheets reciprocal

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
martho
OOo Enthusiast
OOo Enthusiast


Joined: 17 Apr 2004
Posts: 140
Location: Germany

PostPosted: Sat Apr 10, 2010 5:42 am    Post subject: Link cells on 2 different sheets reciprocal Reply with quote

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
View user's profile Send private message
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 1849
Location: Sydney, Australia

PostPosted: Sat Apr 10, 2010 7:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group