View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default If column A = B then pick up value in D.

Try the below in any cell in row1 and copy down as required...

=IF(A1=B1,D1,"")

--
Jacob (MVP - Excel)


"Peter Gasparik" wrote:

Hi I have a problem.
I have two columns in different spreadsheets:
A B D
27238-2807 27736-1321 D1
27736-1321 27238-2807 D2
27736-1321 27736-1321 D3
27736-1321 27736-1321 D8
27251-3761 27238-2807 D1

I would like to write a formula or VBA the if A = B then pick up the value
in column D.
Could you please help?

Many thanks,

Peter.