SOLVED

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

Copper 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 (Copper 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!
1 best response

Accepted Solutions
best response confirmed by ahha_ha (Copper 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 "".

View solution in original post