VLOOKUP/IF returning two different results

USAFpyro

New Member
Joined
Jul 24, 2010
Messages
3
Hello,

I am working on a formula to keep inventory of uniforms and I need some help with the formula.

I have two sheets in the workbook. In sheet one, column A is a master list of uniform numbers (1-240). Column B is a "status" column that will display the result of the formula (resulting in either "IN","OUT",or "MISSING").

The second sheet consists of a list of names in column A. Column B is where the number of the uniform will go for each person. Column C is where missing uniform numbers will go.

What I am trying to do, is get the "status" column of sheet one to display "IN" if the number is not found in either columns B or C of the second sheet, "OUT" if it finds the number in column B of the second sheet, or "MISSING" if the number is found in column C of sheet two.

Any assistance would be greatly appreciated.
Thank you,
Devon
 
Last edited:

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I am currently using this formula which works for getting the "IN" and "OUT" results but am unsure how to get it to display the third result.

=IF(ISNA(VLOOKUP(A3,Sheet2!B:B,1,FALSE)),"IN","OUT")
 
Upvote 0
Hi Devon,

Welcome to MrExcel.

I may be heading in the wrong direction with this, but does this work?...

Put this formula in B2 of sheet1 and copy down to B241

=IF(COUNTIF(Sheet2!B:B,A2),"out",IF(COUNTIF(Sheet2!C:C,A2),"Missing","IN"))

Ak
 
Upvote 0
I am currently using this formula which works for getting the "IN" and "OUT" results but am unsure how to get it to display the third result.

=IF(ISNA(VLOOKUP(A3,Sheet2!B:B,1,FALSE)),"IN","OUT")

This will look possibly as unusual...
Rich (BB code):
=LOOKUP(9.99999999999999E+307,CHOOSE({1,2,3},0,MATCH(A3,Sheet2!B:B,0),
    MATCH(A3,Sheet2!C:C,0)),{"IN","OUT","MISSING"})
 
Upvote 0
Hi Devon,

Welcome to MrExcel.

I may be heading in the wrong direction with this, but does this work?...

Put this formula in B2 of sheet1 and copy down to B241

=IF(COUNTIF(Sheet2!B:B,A2),"out",IF(COUNTIF(Sheet2!C:C,A2),"Missing","IN"))

Ak

THAT WORKED PERFECTLY!!! Thank you sooooo much!! I cannot express how grateful I am. I never thought to use a COUNTIF function with this.

Devon
 
Upvote 0
Hi Devon,

If I were you, I'd try the formula provided by Aladin, he's the expert.

Good luck with your project.

Ak
 
Upvote 0

Forum statistics

Threads
1,215,028
Messages
6,122,749
Members
449,094
Latest member
dsharae57

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top