Importing data from another sheet based on condition

Copper Contributor

Hello all,

 

I need help with importing data to sheet 1 from sheet 2.

 

sheet 1 has name, name of work, date and bill number (name and name of work are empty)

sheet 2 has name, name of work, date and bill number

 

when the data (date and bill number) from sheet 1 matches with date and bill number of sheet 2. Then I want the name and Name of work to be imported to sheet 1 respective column.

 

each sheet has common and un-common data. we need to import only when both rows with date and bill number exactly matches.

1.png2.png

 

Can you please suggest a best way to get this done. let me know if you need any more info.

 

Thanks in advance

3 Replies

@subbucat 

=INDEX(sheet1!$D$2:$D$9,MATCH(1,(sheet2!E2=sheet1!$A$2:$A$9)*(sheet2!F2=sheet1!$B$2:$B$9),0))

You can try INDEX and MATCH. Enter the formula with ctrl+shift+enter if you don't work with Office365 or 2021. 

@OliverScheurich 

Thank you for trying to help.

 

when I put the formula in first cell of column where i want the names to be imported and hit enter, it just shows 0.

 

is there anyway you can help. thank you

@subbucat 

=VLOOKUP(E2&F2,CHOOSE({1,2},sheet1!$A$2:$A$9&sheet1!$B$2:$B$9,sheet1!$D$2:$D$9),2,FALSE)

You can as well apply the above formula. You have to enter the formula with ctrl+shift+enter if you don't work with Office365 or 2021.

 

What Excel version do you work with? If you don't work with Office365 or 2021 the formula doesn't work if you only hit enter instead of hitting ctrl+shift+enter.

 

However if you work with Office365 you can as well apply XLOOKUP instead of INDEX and MATCH or VLOOKUP.