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

[SOLVED] Compare 2 colums of text and sum total

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


Joined: 08 Aug 2012
Posts: 6

PostPosted: Wed Aug 08, 2012 1:56 am    Post subject: [SOLVED] Compare 2 colums of text and sum total Reply with quote

Hi.

I've looked through numerous threads and haven't found the same subject as mine.

I have two columns of text where some are the same entries.

Column A:
NOK1110ND
GARNUVI255WT
TTONEXLBLACK
NOK1616BLCKND
TTONEXLBLACK
W100IBLACKND
WT13IBLACKND

Column B:
GARNUVI255WT
TTONEXLBLACK
NOK1616BLCKND
TTSTARTXXL
NOKC3TSILVND
NOKC5GREY
GARFOR305

And I would like a third column where it could display a "clean" list where it compared the text in column a+b and would give me a list where it removes duplicates from column B. If there are for example 2x TTONEXLBLACK in column A and there is 1xTTONEXLBLACK in column B, so it would display 1xTTONEXLBLACK in column C. I only need end data from column A, since the extras from column B is not being used.

The sum of this list should be:
NOK1110ND
TTONEXLBLACK
W100IBLACKND
WT13IBLACKND

The lists I'm comparing is maximum 1000 entries.

The last thing that would be perfect to have after this list is generated, if it could lookup in another sheet, find the same name-entry from column C5 to C300 and take the background color of this and display it in column C.

Other sheet (where it has the lookup):
WT13IBLACKND is marked as red background color. the other 2 from the "clean list" is not on the other list and should stay as they are.

So the last edited list should be

NOK1110ND
TTONEXLBLACK
W100IBLACKND
WT13IBLACKND (with red background color)

Got any idea how to solve it?

Thanks in advance


Last edited by sirholm on Fri Aug 10, 2012 1:49 am; edited 1 time in total
Back to top
View user's profile Send private message
sirholm
General User
General User


Joined: 08 Aug 2012
Posts: 6

PostPosted: Wed Aug 08, 2012 3:27 am    Post subject: Reply with quote

Can anyone help with the first part only or some of it? I'm pretty stuck and I have to generate this data 30 times every week and I feel my life passing away, since I know it should be possible to make it automatic, at least some part of it Smile
Back to top
View user's profile Send private message
karolus
OOo Advocate
OOo Advocate


Joined: 22 Jun 2011
Posts: 208

PostPosted: Wed Aug 08, 2012 4:48 am    Post subject: Reply with quote

Hello
A three step routine:

1. Formula in C1:
Code:
=IF(COUNTIF($A$1:$A$1000;A1)>COUNTIF($B$1:$B$1000;A1);A1;"")

fill down by double-klicking the lower right Corner of C1.

2. Copy Column C with strg+c and paste special into D1 with strg+shift+v and only with Option [x]Text

3. Mark Column D and →Data→Filter→Standardfilter:
Condition: not Empty
Options:
    [x]no Duplicates
    [x] Output to E1


edit: Correction in Formula →1.

Karo


Last edited by karolus on Wed Aug 08, 2012 5:10 am; edited 1 time in total
Back to top
View user's profile Send private message
sirholm
General User
General User


Joined: 08 Aug 2012
Posts: 6

PostPosted: Wed Aug 08, 2012 5:00 am    Post subject: Reply with quote

Thanks for your reply, but when I use:

Code:
=IF(COUNTIF($A$1:$A$1000;A1)>COUNTIF($B$1:$B$1000;A1;"")

in C1, it gives me error 504.
a1+b1+c1
NOK1110ND LGGD510BLACK Err:504

and tried the next, but it obviusly doesn't work, so got a clue what makes the error? Smile

Thanks in advance
Back to top
View user's profile Send private message
karolus
OOo Advocate
OOo Advocate


Joined: 22 Jun 2011
Posts: 208

PostPosted: Wed Aug 08, 2012 5:07 am    Post subject: Reply with quote

Hello

Sorry my fault:
Correctet:
Code:
=IF(COUNTIF($A$1:$A$1000;A1)>COUNTIF($B$1:$B$1000;A1);A1;"")
Back to top
View user's profile Send private message
sirholm
General User
General User


Joined: 08 Aug 2012
Posts: 6

PostPosted: Wed Aug 08, 2012 5:24 am    Post subject: Reply with quote

Thanks, now it doesn't give errors, but the data isn't correct in C-column.

When TTONEXLBLACK is shows twice in column A and only once in column B, it should only show TTONEXLBLACK once in column C.

GARNUVI255WT is shown once in column A and B and therefore it should not be shown in column C.

Sorry if I'm not clearly enough. Let me know if you are confused with some of the requests.

Is there any way to upload an example?
Back to top
View user's profile Send private message
karolus
OOo Advocate
OOo Advocate


Joined: 22 Jun 2011
Posts: 208

PostPosted: Wed Aug 08, 2012 5:58 am    Post subject: Reply with quote

Hello

Please read my first answer completely, not only the first Paragraph...

Karolus
Back to top
View user's profile Send private message
sirholm
General User
General User


Joined: 08 Aug 2012
Posts: 6

PostPosted: Thu Aug 09, 2012 1:26 am    Post subject: Reply with quote

You are a genius Smile Thanks alot.

Only part I changed to make it perfect was not to remove duplicates, so it would count how many it was. I works perfect with calculating the products. I made a pivot after this, so it could count how many of each Smile

Thanks again, it's so nice Smile
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