Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default Compare two worksheets and identify common entries

Hi All,

I have two different worksheets that both contain a column called Customer
ID. SpreadsheetA contains info on a specific sales reps that belongs to a
specific cusomter ID. SpreadsheetB contains info on sales for the month
belonging to specific customer ID's. I would like to try to compare the like
column (customer ID) so that if there was a sale made to a customer from the
SpreadsheetA it would print the sale amount off of SpreadsheetB. This could
be listed in SpreadsheetB or a new one - that does not matter.

For a more visual explanation:

SpreadsheetA

Customer ID
1001
1005
1099
1255

there is other information in SpreadsheetA, in the other columns, but I am
only using info from SpreadsheetB if the Customer ID is listed in SpreadsheetA

SpreadsheetB

Customer ID Name Sale

1001 ABC Co. $500.00
1002 XYZ Co. $900.00
1255 SKL Co. $200.00
1333 ASD Co. $800.00

Looking to compare both Customer ID columns and printing the info if there
is a match:

1001 $500.00
1255 $200.00


I am using Excel 2007. I have looked in the archives but have not been able
to find my answer. Thanks for your anticipated help!

Mark
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Compare two worksheets and identify common entries

Markt
"MarkT" wrote:

For a more visual explanation:

SpreadsheetA

column
.............A.........................B
1..........Customer ID
2..........1001
3......... 1005
4..........1099
5..........1255

there is other information in SpreadsheetA, in the other columns, but I am
only using info from SpreadsheetB if the Customer ID is listed in SpreadsheetA

SpreadsheetB

Column
...............A..................B..............C
1..........Customer ID.....Name........Sale

3..........1001...............ABC Co.......$500.00
4..........1002...............XYZ Co.......$900.00
5..........1255...............SKL Co.......$200.00
6..........1333...............ASD Co......$800.00

Looking to compare both Customer ID columns and printing the info if there
is a match:

2|... 1001 $500.00 with: =VLOOKUP(A2;SpreadsheetB!$A$2:$C$5;3;FALSE)

4|... 1255 $200.00 with: =VLOOKUP(A4;SpreadsheetB!$A$4:$C$7;3;FALSE)

it is very importend that the both coustomerID in SpreadsheetA and
SpreadsheetB have the same typ, p.e. both are text or both are number

I am using Excel 2007. I have looked in the archives but have not been able
to find my answer. Thanks for your anticipated help!


with regards
Marion
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default Compare two worksheets and identify common entries

Sorry Marion, that didn't seem to work. I am getting #NA errors.

"Marion Löwe" wrote:

Markt
"MarkT" wrote:

For a more visual explanation:

SpreadsheetA

column
............A.........................B
1..........Customer ID
2..........1001
3......... 1005
4..........1099
5..........1255

there is other information in SpreadsheetA, in the other columns, but I am
only using info from SpreadsheetB if the Customer ID is listed in SpreadsheetA

SpreadsheetB

Column
..............A..................B..............C
1..........Customer ID.....Name........Sale

3..........1001...............ABC Co.......$500.00
4..........1002...............XYZ Co.......$900.00
5..........1255...............SKL Co.......$200.00
6..........1333...............ASD Co......$800.00

Looking to compare both Customer ID columns and printing the info if there
is a match:

2|... 1001 $500.00 with: =VLOOKUP(A2;SpreadsheetB!$A$2:$C$5;3;FALSE)

4|... 1255 $200.00 with: =VLOOKUP(A4;SpreadsheetB!$A$4:$C$7;3;FALSE)

it is very importend that the both coustomerID in SpreadsheetA and
SpreadsheetB have the same typ, p.e. both are text or both are number

I am using Excel 2007. I have looked in the archives but have not been able
to find my answer. Thanks for your anticipated help!


with regards
Marion

  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Compare two worksheets and identify common entries

In sheet: A,

Assuming lookup cust id data in col A are consistent with those in sheet B's
col A
Put in B2, format B2 as currency, copy down:
=IF(ISNA(MATCH(A2,B!A:A,0)),"",INDEX(B!C:C,MATCH(A 2,B!A:A,0)))

If the lookup cust id data in col A might be/contain text numbers
while those in sheet B's col A are real numbers,
then try instead in B2:
=IF(ISNA(MATCH(A2+0,B!A:A,0)),"",INDEX(B!C:C,MATCH (A2+0,B!A:A,0)))
The A2+0 bit is one way to convert A2 to real number for correct matching

If the lookup cust id data in col A are real numbers
while those in sheet B's col A are text numbers,
then try in like this in B2:
=IF(ISNA(MATCH(A2&"",B!A:A,0)),"",INDEX(B!C:C,MATC H(A2&"",B!A:A,0)))
The A2&"" bit will convert A2 to text for correct matching

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
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
How to Identify Values in Common Between 2 cells ahofeld Excel Discussion (Misc queries) 1 July 21st 06 07:36 PM
Common Text Entries MeMe Excel Worksheet Functions 2 January 15th 06 09:38 PM
How do I compare data from 2 worksheets to find duplicate entries Jack Excel Discussion (Misc queries) 2 August 16th 05 02:17 PM
Table to pick out most common entries and count occurences of each Neil Goldwasser Excel Worksheet Functions 4 August 6th 05 09:57 AM
common entries between 2 columns Andreas Excel Worksheet Functions 2 July 18th 05 02:33 AM


All times are GMT +1. The time now is 01:20 PM.

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"