0

I have the following excel sheets:

sheet#1 - all rows present
Row_id  Var1
1   
2   
3       
4   
5   
6

sheet#1 - some rows compressed/filtered (not longer visible)
Row_id  Var1
1   
2       
4   
5   

sheet#2 - not compressed/filtered
Row_id  Var1
1       23
2       42      
4       56
5       42

sheet#1  all rows present
Row_id  Var1
1       23
2       42
3       
4       56
5       42
6

I want to copy the data from sheet#2 to sheet#1 with all the row_id correctly matched. sheet#2 only has those row_id that Var1 is not missing. I tried to compressed the rows in sheet#1 to get the same row_id, but after I copy and paste, the pasted entries don't go to the right place.

1 Answer 1

1

A vlookup might help out

You can do a vlookup on sheet#1 and lookup the value of row _id on sheet#2. Place this formula on the column Var1 in sheet 1:

 =IFERROR(VLOOKUP(A2,Sheet2!A:B,2,FALSE),"")

The iferror part of the formula will leave the cell empty if the value isn't present on sheet 2

1
  • Let me know if you need further help
    – gabevt
    Aug 2, 2017 at 19:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .