ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   if statements for multiple entries (https://www.excelbanter.com/excel-worksheet-functions/256472-if-statements-multiple-entries.html)

dlb

if statements for multiple entries
 
I have a spreadsheet that has a ID number in column A and an airport
identifier in column B in sheet 1. I want to return a value ("1") if the ID
number and airport identifier matches the ID and airport identifier in sheet
2. The problem is that sheet 2 will have multiple matching ID numbers and
multiple airport identifiers (column B and C). For example:

Sheet 1
A B
1021 KSUN (I want to return a "1" if KSUN matches any of the rows that
match the ID of "1021")

Sheet 2

A B C
1021 KABC KSTL
1021 KCMH KMEM
1021 KVNY KSUN


T. Valko

if statements for multiple entries
 
Try something like this...

=IF(SUMPRODUCT((Sheet2!A$2:A$4=A2)*(Sheet2!B$2:C$4 =B2))0,1,"")

--
Biff
Microsoft Excel MVP


"DLB" wrote in message
...
I have a spreadsheet that has a ID number in column A and an airport
identifier in column B in sheet 1. I want to return a value ("1") if the
ID
number and airport identifier matches the ID and airport identifier in
sheet
2. The problem is that sheet 2 will have multiple matching ID numbers and
multiple airport identifiers (column B and C). For example:

Sheet 1
A B
1021 KSUN (I want to return a "1" if KSUN matches any of the rows that
match the ID of "1021")

Sheet 2

A B C
1021 KABC KSTL
1021 KCMH KMEM
1021 KVNY KSUN





All times are GMT +1. The time now is 03:07 PM.

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