LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Return Corresponding Value Based on Comparing Two Sheets of Da

show me a couple of ways to do this (so I can learn)

Ok, here'a bunch of examples. This is a good demonstration that shows just
how many different ways you can do something.

Let's assume your data is setup like this:

A2:B7 -

1234 20
4321 10
5678 11
8765 -
9999 12
7777 13

A10:A14 -

5678
8765
1234
4321
8888

Enter any one of these formulas in B10 and copy down to B14:

=IF(ISNA(VLOOKUP(A10,A$2:B$7,2,0)),"",VLOOKUP(A10, A$2:B$7,2,0))

=IF(ISERROR(VLOOKUP(A10,A$2:B$7,2,0)),"",VLOOKUP(A 10,A$2:B$7,2,0))

=IF(ISNA(MATCH(A10,A$2:A$7,0)),"",VLOOKUP(A10,A$2: B$7,2,0))

=IF(ISERROR(MATCH(A10,A$2:A$7,0)),"",VLOOKUP(A10,A $2:B$7,2,0))

=IF(ISNUMBER(MATCH(A10,A$2:A$7,0)),VLOOKUP(A10,A$2 :B$7,2,0),"")

=IF(COUNT(MATCH(A10,A$2:A$7,0)),VLOOKUP(A10,A$2:B$ 7,2,0),"")

=IF(COUNTIF(A$2:B$7,A10),VLOOKUP(A10,A$2:B$7,2,0), "")

=IF(ISNA(MATCH(A10,A$2:A$7,0)),"",INDEX(B$2:B$7,MA TCH(A10,A$2:A$7,0)))

=IF(ISERROR(MATCH(A10,A$2:A$7,0)),"",INDEX(B$2:B$7 ,MATCH(A10,A$2:A$7,0)))

=IF(ISNUMBER(MATCH(A10,A$2:A$7,0)),INDEX(B$2:B$7,M ATCH(A10,A$2:A$7,0)),"")

=IF(COUNT(MATCH(A10,A$2:A$7,0)),INDEX(B$2:B$7,MATC H(A10,A$2:A$7,0)),"")

=IF(COUNTIF(A$2:A$7,A10),INDEX(B$2:B$7,MATCH(A10,A $2:A$7,0)),"")

=IF(COUNTIF(A$2:A$7,A10),OFFSET(B$2,MATCH(A10,A$2: A$7,0)-1,0),"")

=IF(ISNA(MATCH(A10,A$2:A$7,0)),"",OFFSET(B$2,MATCH (A10,A$2:A$7,0)-1,0))

=IF(ISERROR(MATCH(A10,A$2:A$7,0)),"",OFFSET(B$2,MA TCH(A10,A$2:A$7,0)-1,0))

=IF(ISNUMBER(MATCH(A10,A$2:A$7,0)),OFFSET(B$2,MATC H(A10,A$2:A$7,0)-1,0),"")

=IF(COUNT(MATCH(A10,A$2:A$7,0)),OFFSET(B$2,MATCH(A 10,A$2:A$7,0)-1,0),"")

I might have missed a few!

--
Biff
Microsoft Excel MVP


"PaulQ" wrote in message
...
The dash is an actual value. That is, the value returned for row 8765
should
be "-". Thanks!

"T. Valko" wrote:

Sheet 1:
ColumnA ColumnB
8765 -


Is that "dash" entered in the cell or does it represent an empty cell?

Sheet 2:
ColumnA ColumnB
8765 ?


So, what result should appear on Sheet2 for 8765?

--
Biff
Microsoft Excel MVP


"PaulQ" wrote in message
...
Can someone please help me find a formula (or two) for this example. If
you
can show me a couple of ways to do this (so I can learn), I'd greatly
appreciate it! Thanks!

I'm trying to figure out a formula (or two) that will help me
auto-populate
the ? fields within ColumnB of Sheet 2. Also, I want the ? value for
the
"8888" row to return blank, since it does not exist in Sheet 1.

Sheet 1:

ColumnA ColumnB

1234 20
4321 10
5678 11
8765 -
9999 12
7777 13

Sheet 2:

ColumnA ColumnB

5678 ?
8765 ?
1234 ?
4321 ?
8888 ?



.



 
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 Data on 2 sheets Lee Excel Discussion (Misc queries) 1 November 25th 08 03:45 PM
Comparing two lists and return specified data Clement Excel Worksheet Functions 2 January 12th 06 06:31 PM
return array result in cell based on comparing dates Ruthki Excel Worksheet Functions 7 June 30th 05 11:41 PM
Comparing Data between two sheets AChesley Excel Worksheet Functions 1 February 17th 05 02:02 AM
Comparing sheets data Vytautas Excel Discussion (Misc queries) 1 February 15th 05 10:01 AM


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