#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Match and Lookup

I would like to have excel determine if a number in one cell is equal to a
value in another cell. If it finds a match then for it to display the value
found in a corresponding row to the match. If there is no match, then it
should display either a blank or an €œx.€

I tried the LOOKUP function, but the problem is if there is no match LOOKUP
displays a value close to my inquiry as LOOKUP matches the largest value in
lookup_vector.


For example:
A B C D E F
1 7 14 21 42
2 0.1 0.2 0.3 0.4
3
4 14 20 7 21 42 50

In row 5 I want it to determine IF there is a match between A4 (B4,C4, etc.)
and one of the numbers in A1:F1. If there is, I want it to display the
corresponding number from row 2.

When I try LOOKUP (=LOOKUP(A4,$A1:$F1,$A2:$F2)) I get the following:
4 14 20 7 21 42 50
5 0.2 0.2 0.1 0.3 0.4 0.4

The following is how I would like row 5 to look:
4 14 20 7 21 42 50
5 0.2 x 0.1 0.3 0.4 x

Thank you a lot!

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

Try this instead in A5:

=IF(ISNA(HLOOKUP(A4,$A$1:$F$2,2,0)),"x",HLOOKUP(A4 ,$A$1:$F$2,2,0))

then copy across. This will return "x" if there is not an exact match.

Hope this helps.

Pete

On Jul 6, 1:22 am, Biocellguy
wrote:
I would like to have excel determine if a number in one cell is equal to a
value in another cell. If it finds a match then for it to display the value
found in a corresponding row to the match. If there is no match, then it
should display either a blank or an "x."

I tried the LOOKUP function, but the problem is if there is no match LOOKUP
displays a value close to my inquiry as LOOKUP matches the largest value in
lookup_vector.

For example:
A B C D E F
1 7 14 21 42
2 0.1 0.2 0.3 0.4
3
4 14 20 7 21 42 50

In row 5 I want it to determine IF there is a match between A4 (B4,C4, etc.)
and one of the numbers in A1:F1. If there is, I want it to display the
corresponding number from row 2.

When I try LOOKUP (=LOOKUP(A4,$A1:$F1,$A2:$F2)) I get the following:
4 14 20 7 21 42 50
5 0.2 0.2 0.1 0.3 0.4 0.4

The following is how I would like row 5 to look:
4 14 20 7 21 42 50
5 0.2 x 0.1 0.3 0.4 x

Thank you a lot!



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, lookup ??? skimpw Excel Worksheet Functions 0 August 14th 06 03:16 PM
Lookup? Match? pulling rows from one spreadsheet to match a text f cjax Excel Worksheet Functions 3 July 21st 06 02:51 PM
Lookup or Match ? carl Excel Worksheet Functions 4 July 12th 05 07:22 PM
Lookup , match, not sure !? Phil Excel Worksheet Functions 6 June 14th 05 01:38 AM
Lookup / Match help ??? RayG Excel Discussion (Misc queries) 3 January 14th 05 02:13 AM


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