View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default Find a value and return a corresponding number

First turn off the validation to allow Norway to be entered a second time.

Then in C1 enter:

=IF(COUNTIF(B:B,"="&B1)=1,"",INDIRECT("A"&MATCH(B1 ,B:B,0)))

and copy down. The formula will be blank for all entries in column B
appearing only once. Otherwise it will display the equivalent value from
column A
--
Gary''s Student


"Irene" wrote:


Hi!

This is my problem:
I am working on a list A1:B1000.
Colum A contain nr values and colum B contain string values.
I don't want duplicate values in the B colum of the list so I have
formatted the list with Validation to notice me when I type in a string
value that already excist.

But I wonder if it is possible not only to give me this notice but to
return the corresponding value in colum A?

Example: In the end of the list at cell B1034 I type the word Norway.
This word already excist in cell B55, so i am noticed and the value in
cell A55 is returned to me.

regards, Irene


--
Irene
------------------------------------------------------------------------
Irene's Profile: http://www.excelforum.com/member.php...o&userid=34269
View this thread: http://www.excelforum.com/showthread...hreadid=541157