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

Compare 2 cells to 2 ranges and post content of 3rd cell

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
Puttster
General User
General User


Joined: 03 Mar 2011
Posts: 7

PostPosted: Fri Jun 22, 2012 9:55 pm    Post subject: Compare 2 cells to 2 ranges and post content of 3rd cell Reply with quote

I have two lists of names and addresses, with columns for Last Name, First Name, Street Address, Suburb, etc. and rows with the people's names.

There are about 1600 rows of information and 20 columns for each person.

I want to be able to update the data that is missing from one file and exists in the other (which does not have all of the data from the first file).

I can work out which names need to be updated by sorting the information in one list to show blank lines of information, but how can I make a block of cells with only the information I want to copy?

I have used "=IF(ISNA(MATCH($A2,$U$2:$U$2000,0)),"",$A2)" to sort which names in column A (the last names of the people whose addresses are missing) are in column U, which contains the data I need. I also created the same argument in the next column to match the first name with the last name. I can then Copy and Paste Special this information to sort it alphabetically (woo hoo, clever me).

I tried to create a nested IF statement in another column to compare Cell Ax with Column U (last names) and Cell Bx with Column V (first names), and to copy the contact details from Cell Wx if the first two arguments are true.

I must have the syntax wrong, or I'm going about this totally the wrong way, because I can only get Error:508 from this argument:

=IF(AND(ISNA(MATCH($A2,$U$2:$U$2000,0)),(ISNA(MATCH($B2,$V$2:$V$2000,0)),"",$W2))

I'm stuck. Can anyone help me out here?
Back to top
View user's profile Send private message
ozzie
OOo Advocate
OOo Advocate


Joined: 29 Jul 2010
Posts: 400
Location: victoria

PostPosted: Fri Jun 22, 2012 10:13 pm    Post subject: Reply with quote

508 Error: Pair missing For example, closing parenthesis without opening parenthesis
or missing closing parenthesis in the middle of the formula (missing
closing parenthesis at the end of a formula is added automatically).
_________________
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
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Sat Jun 23, 2012 1:58 am    Post subject: Reply with quote

Like 80% of questions in this spreadsheet forum, this is a 100% database task. Such a synchronization would be a plain matter of course when using a database. Update all B items in A where the identifying fields are equal and insert new B records into A where the identifying fields do not exist in A.

Quote:
but how can I make a block of cells with only the information I want to copy?

Append a column of 1s to the one record set and 2s to the other record set in order to mark the origin.
Merge both tables into one and sort them by the fields that identify the same person (name, forename, birth date?) plus the new origin field.
Append a column like
=AND(thisRowName=previousName;thisRowSurname=previousSurname;thisOrigin=2) [should return TRUE for all records of set #2 with equal names in previous row.

Apply a filter to hide unwanted records and copy the remaining ones.
Or apply a filter to show the unwanted ones and delete them. Both actions preserve the hidden rows.

How to sort by more than one column (since v3.3):
Sort by column 5, then 4, then 3, then 2, then 1. Since version 3.3 OOo has a "stable sorting" algorithm which keeps the previous order within the new order.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
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