If column A = B then pick up value in D.

P

Peter Gasparik

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.
 
J

Jacob Skaria

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

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

Mike H

Hi,

Try this and drag down

=IF(Sheet1!A1=Sheet1!B1,Sheet1!D1,"")
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
J

Jacob Skaria

Oops...Didnt notice "different spreadsheets"..Could you please clarify?

--Do you mean ColA and ColB in different "spreadsheets" or both Cols in one
different spreadsheet?

--If both columns are in the same spreadsheet; then try what Mike has posted..

--Do you mean a row to row match or check whether each cell in Col A of
SheetX exist in Col B of SheetY...and if so return the corresponding value of
Cell A1 from SheetX Col D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top