What did I do wrong?

mcintoshmc

Active Member
Joined
Aug 10, 2007
Messages
277
This formula returns "N/A", and for this particular row, it should return "Pending" because the identifier is in the pending hires and transfers page.

=IF(VLOOKUP(A2,'Open Reqs'!A:A,1,FALSE),"ACTIVE",IF(VLOOKUP(A2,'Pending Hires & Transfers'!A:A,1,FALSE),"PENDING",IF(VLOOKUP(A2,Archived!A:A,1,FALSE),"FILLED","CANCELLED")))
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
I tried this, and all the actives worked, but nothing else.

=IF(VLOOKUP(A2,'Open Reqs'!A:A,1,FALSE)=$A2,"ACTIVE",IF(VLOOKUP(A2,'Pending Hires & Transfers'!A:A,1,FALSE)=$A2,"PENDING",IF(VLOOKUP(A2,Archived!A:A,1,FALSE)=$A2,"FILLED","CANCELLED")))
 
Upvote 0
try from the ribbon:
Formulas - Evaluate Formula
 
Last edited:
Upvote 0
If it does not find the value, then it returns error #N/A and it does not continue with the next search.
That's why I use IFERROR(if it does not exist, it returns false)

Try this:

=IF(IFERROR(MATCH(A2,'Open Reqs'!A:A,0),FALSE),"ACTIVE",IF(IFERROR(MATCH(A2,'Pending Hires & Transfers'!A:A,0),FALSE),"PENDING",IF(IFERROR(MATCH(A2,Archived!A:A,0),FALSE),"FILLED","CANCELLED")))
 
Upvote 0
First, =IF(VLOOKUP(A2,'Open Reqs'!A:A,1,FALSE),... and =IF(VLOOKUP(A2,'Open Reqs'!A:A,1,FALSE)=A2,... do not make sense.

If the value in A2 is not in the range 'Open Reqs'!A:A, the function returns #N/A, so the formula does indeed return #N/A.

You do not even get to the "Pending" and "Filled" tests.

I think you want the following:

=IF(ISNUMBER(MATCH(A2,'Open Reqs'!A:A,0)),"ACTIVE",
IF(ISNUMBER(MATCH(A2,'Pending Hires & Transfers'!A:A,0)),"PENDING",
IF(ISNUMBER(MATCH(A2,Archived!A:A,0)),"FILLED","CANCELLED")))

Unrelated observation.... Instead of A:A, I would use $A$1:$A$1000 or whatever range is sufficient, while reasonably large enough to accommodate additions. I don't know if MATCH is smart enough to avoid searching all 1+ million rows.
 
Upvote 0

Forum statistics

Threads
1,215,006
Messages
6,122,666
Members
449,091
Latest member
peppernaut

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