If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
If column A = B then pick up value in D.
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. |
#2
|
|||
|
|||
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. |
#3
|
|||
|
|||
If column A = B then pick up value in D.
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. "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. |
#4
|
|||
|
|||
If column A = B then pick up value in D.
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 -- Jacob (MVP - Excel) "Jacob Skaria" wrote: 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. |
Thread Tools | |
Display Modes | |
|
|