# If not working properly

#### hooty22

##### New Member
I currently have two pages in a book. One page is an inventory page. It has all inventory listed. The second page lists all the shipping information for any inventory that is out.

I want an availability column on the first Inventory page to state Yes if the inventory name is not listed on the second page. I want it to read No if the inventory is listed on the second shipping page. I tried =IF((Inventory!A4='Shipping Information'!\$A:\$A), "NO", "YES") but it is not working correctly.

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### MrKowz

##### Well-known Member
Try out the MATCH function.

=MATCH(Inventory!A4,'Shipping Information'!\$A:\$A,0)

However, this will return #N/A! when it does not find a match. To handle this, we put it inside of an IF(ISERROR function.

=IF(ISERROR(MATCH(Inventory!A4,'Shipping Information'!\$A:\$A,0)),"YES","NO")

#### Weaver

##### Well-known Member
try:

=IF(countif('Shipping Information'!\$A:\$A,Inventory!A4)=0, "NO", "YES")

#### T. Valko

##### Well-known Member
I currently have two pages in a book. One page is an inventory page. It has all inventory listed. The second page lists all the shipping information for any inventory that is out.

I want an availability column on the first Inventory page to state Yes if the inventory name is not listed on the second page. I want it to read No if the inventory is listed on the second shipping page. I tried =IF((Inventory!A4='Shipping Information'!\$A:\$A), "NO", "YES") but it is not working correctly.

Here's one way...

=IF(COUNTIF('Shipping Information'!\$A:\$A,Inventory!A4),"No","Yes")

#### hooty22

##### New Member
Still not working properly. I do have drop boxes in the second page that are populated with the data from the Inventory page. Is that preventing me from using the IF function?

#### hooty22

##### New Member
ARGH. It will work properly for the first 3 items on the Inventory sheet, but will not find the remaining data on the second sheet.

#### MrKowz

##### Well-known Member
Can you give us a sample of your data? There could be underlying issues.

#### hooty22

##### New Member
I <3 =Clean... I don't know why it works, but it does. Thanks so much for the help everyone!

Replies
0
Views
309
Replies
6
Views
456
Replies
3
Views
277
Replies
0
Views
509
Replies
15
Views
2K

1,191,043
Messages
5,984,308
Members
439,882
Latest member
gerdc

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back