View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Macro to compare values and return exact matching value

=if(isnumber(Match(A1,$B$200,0)),index($B$1:$B$200 ,Match(A1,$B$200,0),1),"")

Drag fill the formula down column C.

--
Regards,
Tom Ogilvy

wrote in message
om...
I am trying to find a macro to compare a value in column 1 to a range
of values in column 2 and return the column 2 value to column 3 if
there is an exact match. I also do not want to return the column 2
value to column three more times than the value exists in column 2.

The application would be similar to MATCH except that I want the value
in the array in column 2, not it's relative position.

Any help would be appreciated.