How to copy data from sheet1 to sheet2 with condition in Excel

In excel workbook I am trying to copy data from sheet1 to sheet2 with IF condition ((Sheet1! B2: B80 = Sheet2! A2: A80), Sheet2! D2) I am not getting the result. Help me resolve this.

I am trying to copy from sheet1 to sheet2 with the condition if the value in sheet 1, column B is equal to the value in column A of table 2, the value in column D of sheet 2 should be copied to column G of sheet 1

+1


source to share


4 answers


Try to debug it step by step . What happens if you change the formula to:

=IF((Sheet1!B2:B3=Sheet2!A2:A3),Sheet2!D2)

      

?



or

=IF((Sheet1!B2:B3=Sheet2!A2:A3),"the same values")

      

It may be that not all values ​​are actually the same in columns A and B. Or, D2 does not contain what you expect.

+1


source


Place the following formula in the first cell of column G

=IF((Sheet1!B1=Sheet2!A1), Sheet2!D1)

      



then copy that cell all the way. Excel will change all cell references for you.

+1


source


this should do what you need.

= IF (Sheet1! B1 = Sheet2! A1, Sheet2! D1)

0


source


= IF (EXACT (Sheet1! B1, Sheet2! A1), Sheet2! D1)

0


source







All Articles