ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   multiple column lookups (https://www.excelbanter.com/excel-worksheet-functions/69938-re-multiple-column-lookups.html)

Kevin Vaughn

multiple column lookups
 
These two (array) formulae seem to do the trick:

=IF(ISNA(MATCH(A2&B2,Sheet2!$A$2:$A$13 & Sheet2!$B$2:$B$13,0)),"No","Yes")

=IF(D2 = "Yes",
IF(C2=INDEX(Sheet2!$C$2:$C$13,MATCH(A2&B2,Sheet2!$ A$2:$A$13&Sheet2!$B$2:$B$13,0)),"$ok","$No"),"")

--
Kevin Vaughn


"Mark B" wrote:

I need to get a formula for Col D in sheet 1 to tell me that for column A in
Sheet 1
Col B does have a matching TYPE in Sheet 2.
And then, once that is established (or fixed), I need a formula for Col E
which would test both Col A & Col B and confirm that Col C (Cost) matches.


Sheet 1
Col A Col B Col C Col D Col E
Trip Type Cost
A Single $100 Yes $ok
A Quad $400 Yes $ok
B Super $200 NO
C Double $300 Yes $NO

Sheet 2
Col A Col B Col C
Trip Type Cost
A Single $100
A Double $200
A Triple $300
A Quad $400
B Single $100
B Double $200
B Triple $300
B Quad $400
C Single $100
C Double $200
C Triple $300
C Quad $400





All times are GMT +1. The time now is 10:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com