#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
fluffy
 
Posts: n/a
Default compare columns

I have close codes in columns for two tied accounts. CLosed codes 1 and 9 =
active, and 2, 3, 8 = closed. I need to compare the two columns to
determine which accounts have one active account and one closed account.
Example: If Column A = 1 or 9 and Column C = 2, 3 or 8, I need to indicate
in Column D "inequal". If Column A = 1 or 9 and Column C = 1 or 9 I need
Column D to indicate "equal". If Column A = 2, 3, or 8 and Column C = 1 or
9, I need Column D to indicate "inequal" and if Column A = 2, 3, or 8 and
Column C = 2, 3, or 8 I need Column D to indicate "equal".
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default compare columns

Perhaps something like this:

=IF(MOD(AVERAGE(CHOOSE((A1:B1)+1,0.1,1,10,10,0.1,0 .1,0.1,0.1,10,1)),1)=0,"Equal","Inequal")

Note: Commit that array formula by holding down the [Ctrl][Shift] keys and
press [Enter].

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"fluffy" wrote:

I have close codes in columns for two tied accounts. CLosed codes 1 and 9 =
active, and 2, 3, 8 = closed. I need to compare the two columns to
determine which accounts have one active account and one closed account.
Example: If Column A = 1 or 9 and Column C = 2, 3 or 8, I need to indicate
in Column D "inequal". If Column A = 1 or 9 and Column C = 1 or 9 I need
Column D to indicate "equal". If Column A = 2, 3, or 8 and Column C = 1 or
9, I need Column D to indicate "inequal" and if Column A = 2, 3, or 8 and
Column C = 2, 3, or 8 I need Column D to indicate "equal".

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
 
Posts: n/a
Default compare columns

Try this
=IF(OR(A1=1,A1=9),IF(OR(C1=1,C1=9),"Equal",IF(OR(C 1=2,C1=3,C1=8),"Unequal","?")),IF(OR(A1=2,A1=3,A1= 8),IF(OR(C1=2,C1=3,C1=8),"Equal",IF(OR(C1=1,C1=9), "Unequal","??")),"???"))

If A has 1 or 9 but C does not have valid number (1,9,2,3,8) then you get
one question mark (?)
If both A has 2, 3 or 8 but C is invalid you get (??)
If C is 1 or 9 and A is invalid you get 3 ?
If A is invalid you get (???)

Experiment to double check.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"fluffy" wrote in message
...
I have close codes in columns for two tied accounts. CLosed codes 1 and 9
=
active, and 2, 3, 8 = closed. I need to compare the two columns to
determine which accounts have one active account and one closed account.
Example: If Column A = 1 or 9 and Column C = 2, 3 or 8, I need to
indicate
in Column D "inequal". If Column A = 1 or 9 and Column C = 1 or 9 I need
Column D to indicate "equal". If Column A = 2, 3, or 8 and Column C = 1
or
9, I need Column D to indicate "inequal" and if Column A = 2, 3, or 8 and
Column C = 2, 3, or 8 I need Column D to indicate "equal".



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JudithJubilee
 
Posts: n/a
Default compare columns

Hello Fluffy,

Someone here probably has an easier formula but here goes:

=IF(OR(AND(OR(A1=1,A1=9),OR(C1=2,C1=3,C1=8)),AND(O R(A1=2,A1=3,A1=8),OR(C1=1,C1=9))),"Inequal","Equal ")

Judith
--
Hope this helps


"fluffy" wrote:

I have close codes in columns for two tied accounts. CLosed codes 1 and 9 =
active, and 2, 3, 8 = closed. I need to compare the two columns to
determine which accounts have one active account and one closed account.
Example: If Column A = 1 or 9 and Column C = 2, 3 or 8, I need to indicate
in Column D "inequal". If Column A = 1 or 9 and Column C = 1 or 9 I need
Column D to indicate "equal". If Column A = 2, 3, or 8 and Column C = 1 or
9, I need Column D to indicate "inequal" and if Column A = 2, 3, or 8 and
Column C = 2, 3, or 8 I need Column D to indicate "equal".

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare multiple column of data and list out common and unique component in adj columns kuansheng Excel Worksheet Functions 15 February 1st 06 10:49 PM
compare 2 columns BettysAnswer Excel Worksheet Functions 1 January 27th 06 09:46 PM
Compare 2 columns, and create a list of items that are in both lists ruby2sdy Excel Worksheet Functions 3 October 8th 05 11:04 AM
Compare data in two columns to find duplicates. Dan Excel Discussion (Misc queries) 2 October 5th 05 04:42 AM
how do I compare columns in two different workbooks? Provider98122 Excel Discussion (Misc queries) 5 March 10th 05 03:33 AM


All times are GMT +1. The time now is 06:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"