Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 361
Default Find A Match Formula

Here's my data table - Starts in A1 (Sheet1)

Type Code
9P170.00 RI
9P170.00 RI
9P160.00 RI
9P160.00 RI
9P150.00 SI
9P150.00 SI
9P140.00 RI
9P140.00 RI

I am trying to create this table - Starts in A1 (Sheet2)

Type Code
9P170.00 RI
9P160.00 RI
9P150.00 SI
9P140.00 RI


So. I am trying to find a formula for B2:B5 that will look at A2:A5 (Sheet2)
find the match in A2:A8 (Sheet 1) and if a match is found, return value in
B2:B8 (Sheet1). If no match is found, return "No Match".

Thank you in advance.





  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Find A Match Formula

Try this in B2 of Sheet2:

=IF(ISNA(VLOOKUP(A2,Sheet1!A$2:B$8,2,0)),"No match",
VLOOKUP(A2,Sheet1!A$2:B$8,2,0))

All one formula - I've split it to avoid awkward line-breaks. Copy
down into B3:B5.

Hope this helps.

Pete

On Feb 27, 7:30 pm, carl wrote:
Here's my data table - Starts in A1 (Sheet1)

Type Code
9P170.00 RI
9P170.00 RI
9P160.00 RI
9P160.00 RI
9P150.00 SI
9P150.00 SI
9P140.00 RI
9P140.00 RI

I am trying to create this table - Starts in A1 (Sheet2)

Type Code
9P170.00 RI
9P160.00 RI
9P150.00 SI
9P140.00 RI

So. I am trying to find a formula for B2:B5 that will look at A2:A5 (Sheet2)
find the match in A2:A8 (Sheet 1) and if a match is found, return value in
B2:B8 (Sheet1). If no match is found, return "No Match".

Thank you in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 361
Default Find A Match Formula

thank You Pete. I tried this but did not work out. Perhaps because my data
table has dups or is not sorted correctly.

I think I need some sort of match/index type formula ?

"Pete_UK" wrote:

Try this in B2 of Sheet2:

=IF(ISNA(VLOOKUP(A2,Sheet1!A$2:B$8,2,0)),"No match",
VLOOKUP(A2,Sheet1!A$2:B$8,2,0))

All one formula - I've split it to avoid awkward line-breaks. Copy
down into B3:B5.

Hope this helps.

Pete

On Feb 27, 7:30 pm, carl wrote:
Here's my data table - Starts in A1 (Sheet1)

Type Code
9P170.00 RI
9P170.00 RI
9P160.00 RI
9P160.00 RI
9P150.00 SI
9P150.00 SI
9P140.00 RI
9P140.00 RI

I am trying to create this table - Starts in A1 (Sheet2)

Type Code
9P170.00 RI
9P160.00 RI
9P150.00 SI
9P140.00 RI

So. I am trying to find a formula for B2:B5 that will look at A2:A5 (Sheet2)
find the match in A2:A8 (Sheet 1) and if a match is found, return value in
B2:B8 (Sheet1). If no match is found, return "No Match".

Thank you in advance.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Find A Match Formula

You can use INDEX/MATCH instead of VLOOKUP, but they will both work in
the same way - they will try to find a match in your table and if one
does not exist they will report an error. My formula traps this error
and tells you that you have no match.

In what way did it not work out? Did you get the message "No match",
or did you get results that you did not expect? If you do have
duplicates in your table then VLOOKUP (and MATCH if you use that) will
find the first match and return the corresponding value from that
first match, whereas you might expect the value from a different
match.

If you got "No match" then it means there are no matching values - as
you are looking for strings, you may have leading or trailing spaces
either in your table on Sheet1 or in the list in Sheet2.

Hope this helps further.

Pete

On Feb 27, 10:38 pm, carl wrote:
thank You Pete. I tried this but did not work out. Perhaps because my data
table has dups or is not sorted correctly.

I think I need some sort of match/index type formula ?



"Pete_UK" wrote:
Try this in B2 of Sheet2:


=IF(ISNA(VLOOKUP(A2,Sheet1!A$2:B$8,2,0)),"No match",
VLOOKUP(A2,Sheet1!A$2:B$8,2,0))


All one formula - I've split it to avoid awkward line-breaks. Copy
down into B3:B5.


Hope this helps.


Pete


On Feb 27, 7:30 pm, carl wrote:
Here's my data table - Starts in A1 (Sheet1)


Type Code
9P170.00 RI
9P170.00 RI
9P160.00 RI
9P160.00 RI
9P150.00 SI
9P150.00 SI
9P140.00 RI
9P140.00 RI


I am trying to create this table - Starts in A1 (Sheet2)


Type Code
9P170.00 RI
9P160.00 RI
9P150.00 SI
9P140.00 RI


So. I am trying to find a formula for B2:B5 that will look at A2:A5 (Sheet2)
find the match in A2:A8 (Sheet 1) and if a match is found, return value in
B2:B8 (Sheet1). If no match is found, return "No Match".


Thank you in advance.- Hide quoted text -


- Show quoted text -



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
Match, Find? Danny Excel Worksheet Functions 1 April 27th 06 01:40 AM
Using MATCH to find the 2nd match, not only 1st MLP Excel Discussion (Misc queries) 4 October 13th 05 11:08 PM
How do I display more than one match in a Index/Match formula? Trish Excel Worksheet Functions 0 September 26th 05 10:21 PM
Lookup Formula - but have a formula if it can't find/match a value Stephen Excel Worksheet Functions 11 June 14th 05 05:32 AM
find and match the max buffyslay Excel Worksheet Functions 1 November 2nd 04 12:20 PM


All times are GMT +1. The time now is 01:38 AM.

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"