user8434445
user8434445

Reputation:

IF Statement to check different IP addresses for a company ID in Excel 2016

I'm trying to work out whether an ID and ip address is for a specific company.

In the list of IP addresses there are 2 that I need to look for (192.4.5.6 & 192.4.5.9) out of 10 different ip addresses.

If it's a certain ID number (GH113) I want it to print out "yes" for the 2 ip addresses listed above and if it has that same ID but a different ip address I want it to print out "no". If none match the ID or IP address I want it to print out "N/A".

I've got the following formula which is only printing "yes" and "no" but not "N/A" but it's also printing out "FALSE" and I'm not sure why:

=IF(B2="GH113",IF(F2="192.4.5.6","No",IF(B2="GH113",IF(F2="192.4.5.9","No","Yes"),"N/A")))

B2 is the ID column and GH113 is the company ID I am looking for. F2 refers to the IP addresses column and the ip addresses listed above are the ones I am searching for.

Any help on where I am going wrong would be greatly appreciated.

Thanks

Upvotes: 0

Views: 634

Answers (1)

Shazu
Shazu

Reputation: 587

=IF(B2="GH113", IF(OR(F2="192.4.5.6", F2="192.4.5.9"), "yes", "no"), "N/A")

Upvotes: 1

Related Questions