Thread: Mach
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default Mach

assume that the number you wish to match is in cell A1 and the list of
numbers to try to find it in is in column B, from B1 through B100.
=MATCH(A1,B1:B100,0)
or
=MATCH(A1,B:B,0)
will return the position of the first place in column B where an exact match
to the number in A1 is found. If a match is not found, these formulas would
return "#N/A" error.
Excel Help for MATCH will tell you about other options to use for the ",0)"
portion of the formula. It also works for text as well as numbers.

to deal with the no-match #N/A error, you can write the formula like this:
=IF(ISNA(MATCH(A1,B1:B100)),"No Match",MATCH(A1,B1:B100))
or even as
=IF(ISNA(MATCH(A1,B1:B100)),"",MATCH(A1,B1:B100))

"Dividend" wrote:

How can I match one number from certain column to the exact number in second
column xls