Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 41
Default Comparing Cell Contents in 2 or More Columns

The title of this post doesn't quite capture what I'd love to be able to do.

I have a column of master data in Column A. These records comprise the
entire set of data to be considered. In Column B, I import records that are
a subset of the records in Column A. Is there a way to "sort" the data in
Column B so that B2 = A2, B44=A44, etc.

An example would be:

A1 - "Record 1" B1 - "Record 1"
A2 - "Record 2" B2 - " " (no record in the subset, so it's blank)
A3 - "Record 3" B3 - "Record 3"
A4 - "Record 4" B4 - "Record 4"
A5 - "Record 5" B5 - no record in the subset, so again, it's blank

While I'm on the subject, If the above actually can be done, if I had data
in columns C and D that was related to data in Column B, could I sort B,C,
and D columns as a group, but make the data in B my sort key (as I've dopne
above)?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Comparing Cell Contents in 2 or More Columns

One way to achieve this ..

Assuming master key data in col A, subset key data in col B with ancillary
subset data in cols C and D, all data from row1 down

Put in E1:
=IF(ISNA(MATCH($A1,$B:$B,0)),"",INDEX(B:B,MATCH($A 1,$B:$B,0)))
Copy E1 to G1, fill down to the last row of data in col A. Cols E to G would
return the results that you seek.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"ConfusedNHouston" wrote:
The title of this post doesn't quite capture what I'd love to be able to do.

I have a column of master data in Column A. These records comprise the
entire set of data to be considered. In Column B, I import records that are
a subset of the records in Column A. Is there a way to "sort" the data in
Column B so that B2 = A2, B44=A44, etc.

An example would be:

A1 - "Record 1" B1 - "Record 1"
A2 - "Record 2" B2 - " " (no record in the subset, so it's blank)
A3 - "Record 3" B3 - "Record 3"
A4 - "Record 4" B4 - "Record 4"
A5 - "Record 5" B5 - no record in the subset, so again, it's blank

While I'm on the subject, If the above actually can be done, if I had data
in columns C and D that was related to data in Column B, could I sort B,C,
and D columns as a group, but make the data in B my sort key (as I've dopne
above)?

  #3   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Comparing Cell Contents in 2 or More Columns

the simplest way is to actually put the imported data in a separate sheet
(Sheet2? starting column b)
in b1 of Sheet1 enter
=if(isna(vlookup($A1,'Sheet2'!$B:$D,column(),0),"" ,vlookup($A1,'Sheet2'!$B:$D,column(),0))
caopy and paste as far over and down as you need
to check if any of the imported data does not have an existing match
in A1 of sheet2
=countif('Sheet1'!A:A,B1)
anything which is a zero will not have a reference

"ConfusedNHouston" wrote:

The title of this post doesn't quite capture what I'd love to be able to do.

I have a column of master data in Column A. These records comprise the
entire set of data to be considered. In Column B, I import records that are
a subset of the records in Column A. Is there a way to "sort" the data in
Column B so that B2 = A2, B44=A44, etc.

An example would be:

A1 - "Record 1" B1 - "Record 1"
A2 - "Record 2" B2 - " " (no record in the subset, so it's blank)
A3 - "Record 3" B3 - "Record 3"
A4 - "Record 4" B4 - "Record 4"
A5 - "Record 5" B5 - no record in the subset, so again, it's blank

While I'm on the subject, If the above actually can be done, if I had data
in columns C and D that was related to data in Column B, could I sort B,C,
and D columns as a group, but make the data in B my sort key (as I've dopne
above)?

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
Comparing Field Contents Wayne Taylor Excel Discussion (Misc queries) 2 February 26th 07 10:40 AM
Combining Cell Contents - entire columns SV Excel Worksheet Functions 7 December 11th 06 11:30 PM
Comparing cell contents with different reference cells Martin B Excel Worksheet Functions 3 November 22nd 06 07:10 PM
Comparing contents of two spreadsheets and outputting results to a brx Excel Worksheet Functions 5 March 17th 05 01:44 AM
Comparing Workbook contents SMC Excel Discussion (Misc queries) 1 January 5th 05 09:48 PM


All times are GMT +1. The time now is 06:33 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"