user3095635
user3095635

Reputation: 21

Excel, copying cell between sheets based on criteria

I need to copy cells from one sheet to the other based on another cell.

If cell.columnA from sheet1 contains the text from cell.columnA from sheet2, copy cell.columnB, cell.columnC, cell.columnD from sheet1 to sheet2.

Is this possible to do?

Upvotes: 1

Views: 46455

Answers (1)

C1pher
C1pher

Reputation: 1972

This is completely possible. I would use the if and vlookup functions. Something like this:

=IF($A1=Sheet1!$A1, VLOOKUP(Sheet1!$A1, Sheet1!$A1:$D1, 2),"")

The dollar signs lock the columns so you can paste over many rows, the if checks for equality of column a values, Sheet1!$A1:$D1 is the range you specified between columns a through d, and the 2 represents the second column in that range. This example was for column b in row 1 on sheet 2.

Upvotes: 2

Related Questions