Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 2
Default Need to dictate for data in two columns that A,B = B,A

I need to sort several columns of data by the information in only two, but not as a nested sort.

Columns A and B each contain individuals 1-13, column A as actor, column B as recipient. I want to tell excel to identify the pairing 1,3 as the same pair as the pairing 3,1 and to label all of those pairings as "pair 1-3."
  #2   Report Post  
Junior Member
 
Posts: 2
Default

I can get as far as getting excel to recognize matches by concatenating the information from two columns(let's say in a new column C), then reversing the text string of the concatenation (let's say in a new column D), and telling column E to =IF(MATCH(C8,$D$8:$D$1996,0),1,0).

But all this does is return a 1 in column E for matches 1-3, 3-1; 2-6, 6-2; 12-13, 13-12, etc. What I really want to be able to do is get it to return a unique result for each unique pair, recognizing that 1-3 is not different from 3-1 but IS different from 1-4 and 4-1, which, in turn, are not different from each other.

Any ideas?
  #3   Report Post  
Senior Member
 
Location: Philippines
Posts: 161
Default

Quote:
Originally Posted by desertanimal View Post
I can get as far as getting excel to recognize matches by concatenating the information from two columns(let's say in a new column C), then reversing the text string of the concatenation (let's say in a new column D), and telling column E to =IF(MATCH(C8,$D$8:$D$1996,0),1,0).

But all this does is return a 1 in column E for matches 1-3, 3-1; 2-6, 6-2; 12-13, 13-12, etc. What I really want to be able to do is get it to return a unique result for each unique pair, recognizing that 1-3 is not different from 3-1 but IS different from 1-4 and 4-1, which, in turn, are not different from each other.

Any ideas?
What you can do is that: Let Column A label with numbers 1 - 13 until row 169, then for Column B label with letters A - M until row 169. Meaning;

A B
1 A
2 A
3 A
4 A
5 A
6 A

This way, you won't have any issue with duplicates (ie. 1-13 with 11-3 or 11-2 with 1-12).

Next columns will be the possible combination. Column C will have CONCATENATE(A1,B1), column D will have CONCATENATE(B1,A1).

For column E will be your PAIR labeled as =CONCATENATE("Pair ",A1," - ",B1).

Let's say the query is at G1. On H1, your formula should be:
=IF(ISERROR(VLOOKUP(G1,$C$1:$E$182,3,0)),VLOOKUP(G 1,$D$1:$E$182,2,0),VLOOKUP(G1,$C$1:$E$182,3,0))
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
Can selection from text drop-down dictate value in another cell Relating text to values in drop-downs Excel Worksheet Functions 3 February 20th 09 08:50 PM
Sorting Data into columns without replacing the columns with data Sandaime New Users to Excel 2 October 18th 07 01:35 PM
Text to dictate colour of the cell and/or row Aaron Hodson \(Coversure\) Excel Worksheet Functions 2 October 5th 07 10:38 AM
How do I dictate cell to cell progression in a protected worksheet Mike Excel Worksheet Functions 1 September 1st 06 10:31 PM
Dictate physical size of pictures inserting into Excel? D Harman Excel Discussion (Misc queries) 0 June 15th 06 03:53 PM


All times are GMT +1. The time now is 04:55 PM.

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

About Us

"It's about Microsoft Excel"