Lookup Value from two sheets by dates

Brass Contributor

Hi All,

I am trying to lookup ID values from two sheets which have dates ..I am trying to lookup value by date....Can you please help me ,,I have attached sample excel sheet and highlighted the sample below too....Under Sheet 1 I am expecting the answer as in lookup value-Answer expected column

Sheet1
Date ID Lookup Value-Answer expected 
1-Sep 103 103
1-Sep 102 102
1-Sep 101 NA
4-Sep 105 105
4-Sep 106 106
5-Sep 101 NA
5-Sep 104 NA
5-Sep 106 NA
5-Sep 199 199
5-Sep 200 200


Sheet 2

Date ID
1-Sep 102
1-Sep 103
4-Sep 105
4-Sep 106
5-Sep 199
5-Sep 200

2 Replies

Hi

 

Try:

=COUNTIFS(Sheet2!$A$2:$A$7,A2,Sheet2!$B$2:$B$7,B2)*B2

or:

=SUMIFS(Sheet2!$B$2:$B$7,Sheet2!$A$2:$A$7,A2,Sheet2!$B$2:$B$7,B2)

 

@Detlef Lewin :Thanks !..