SOLVED

If statement help: Sheet1 Col 1 equals Col 2 on sheet2, then copy Sheet2 Col 3 to Sheet1

%3CLINGO-SUB%20id%3D%22lingo-sub-2372614%22%20slang%3D%22en-US%22%3EIf%20statement%20help%3A%20Sheet1%20Col%201%20equals%20Col%202%20on%20sheet2%2C%20then%20copy%20Sheet2%20Col%203%20to%20Sheet1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2372614%22%20slang%3D%22en-US%22%3E%3CP%3EI%20attempted%20a%20formula%20in%20Sheet1%20Col%20R.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20Sheet1%20Col%20H%20%3D%26nbsp%3BPrePlanning%20respnse%20emails%20Col%20A%3C%2FP%3E%3CP%3EThen%20copy%26nbsp%3BPrePlanning%20respnse%20emails%20Col%20B%26nbsp%3B%20%26nbsp%3Bto%20Sheet1%20Col%20R%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%20for%20such%20simple%20formula%20help.%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EAl%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2372614%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2372883%22%20slang%3D%22en-US%22%3ERe%3A%20If%20statement%20help%3A%20Sheet1%20Col%201%20equals%20Col%202%20on%20sheet2%2C%20then%20copy%20Sheet2%20Col%203%20to%20Sheet1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2372883%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F997038%22%20target%3D%22_blank%22%3E%40ahha_ha%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20formula%20in%20R2%20should%20be%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIFERROR(VLOOKUP(H2%2C%20'PrePlanning%20respnse%20emails'!%24A%242%3A%24B%2473%2C%202%2C%20FALSE)%2C%22%22)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20lookup%20range%20is%20A2%3AB73%20(two%20columns).%20Since%20we%20don't%20want%20this%20range%20to%20shift%20as%20we%20fill%20down%20the%20formula%2C%20we%20make%20the%20reference%20absolute%3A%20%24A%242%3A%24B%2473.%20If%20there%20is%20a%20match%20in%20the%20first%20column%2C%20we%20return%20a%20value%20from%20the%20second%20column%2C%20so%20the%203rd%20argument%20is%202.%20FALSE%20as%204th%20argument%20specifies%20that%20we%20want%20an%20exact%20match.%3C%2FP%3E%0A%3CP%3EThe%20IFERROR%20replaces%20the%20%23N%2FA%20error%20if%20the%20name%20is%20not%20found%20with%20an%20empty%20string%20%22%22.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2375533%22%20slang%3D%22en-US%22%3ERe%3A%20If%20statement%20help%3A%20Sheet1%20Col%201%20equals%20Col%202%20on%20sheet2%2C%20then%20copy%20Sheet2%20Col%203%20to%20Sheet1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2375533%22%20slang%3D%22en-US%22%3ETHANKS!!!%20That%20was%20perfect%20and%20it%20works%20excellent.%20Thanks%20again%20for%20your%20time!%3C%2FLINGO-BODY%3E
Occasional Contributor

I attempted a formula in Sheet1 Col R.

 

If Sheet1 Col H = PrePlanning respnse emails Col A

Then copy PrePlanning respnse emails Col B   to Sheet1 Col R

 

Sorry for such simple formula help.

Thanks,

Al

2 Replies
best response confirmed by ahha_ha (Occasional Contributor)
Solution

@ahha_ha 

The formula in R2 should be

 

=IFERROR(VLOOKUP(H2, 'PrePlanning respnse emails'!$A$2:$B$73, 2, FALSE),"")

 

The lookup range is A2:B73 (two columns). Since we don't want this range to shift as we fill down the formula, we make the reference absolute: $A$2:$B$73. If there is a match in the first column, we return a value from the second column, so the 3rd argument is 2. FALSE as 4th argument specifies that we want an exact match.

The IFERROR replaces the #N/A error if the name is not found with an empty string "".

THANKS!!! That was perfect and it works excellent. Thanks again for your time!