Vlookup Multible Entires (Conditions

ochiha

New Member
Joined
Nov 6, 2009
Messages
31
Hello there,
I have two sheets, the first one includes employee requests where an employee can have more than one listed request, some of them are market "DONE", Some marked "Rejected".
what am I trying to do is link this sheet with another sheet that include employee vacation/ Cancellation, where there will be a cell that shows if there are any under process applications for the employees before they leave on vacation.
The limitations and exlusions in this formula are:
1. Multible requests
2. "Done" and "Rejected" requests (Must be excluded)
3. I need the result to appear in the employee vacation sheet

THis is as far as I went: =IF(OR(VLOOKUP(D3,'Employee Request'!C$3:G$551,5,0)="Done",VLOOKUP(D3,'Employee Request'!C$3:G$551,5,0)="Rejected"),"",MATCH(D3,'Employee Request'!C$3:G$374,0))
Employee Vacation Sheet
Employee_Vacation_Cancellation.bmp

Employee Request Sheet
Employee_Request.bmp
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
How about using a countifs instead (since effectively you want to know how many)



=COUNTIFS('Employee Request'!C$3:G$551,"=" & G16)-(COUNTIFS('Employee Request'!C$3:G$551,"=" & G16,'Employee Request'!C$3:G$551,"=Done")+COUNTIFS('Employee Request'!C$3:G$551,"=" & G16,'Employee Request'!C$3:G$551,"=Rejected"))
 
Upvote 0
How about using a countifs instead (since effectively you want to know how many)



=COUNTIFS('Employee Request'!C$3:G$551,"=" & G16)-(COUNTIFS('Employee Request'!C$3:G$551,"=" & G16,'Employee Request'!C$3:G$551,"=Done")+COUNTIFS('Employee Request'!C$3:G$551,"=" & G16,'Employee Request'!C$3:G$551,"=Rejected"))

isnt there a possibility to know the request type?
 
Upvote 0
Is that just the first in the list regardless? or is there a logic to the order of the source data? As in, descending by decision date or submission date<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
if someone has 7 outstanding Vacation requests is that relevant compared to someone who has one)
<o:p> </o:p>
you probably need to create a pivot table of the source but getting the first of anything in excel depends on order and magnitude
<o:p> </o:p>
VLOOKUP probably won’t get you what you need BUT
<o:p> </o:p>
From the example getting the first entry by employee number would need the source workbook sorted by employee number then sorted by decision date (descending?) or submission date and hoping the first in list isn’t done hiding the next in list which might be Under consideration…..<o:p></o:p>

You need to know what you’re trying to achieve

at least with the "countifs" you know when you have something relevant
(obviously you should change the address items to suit your data)

=COUNTIFS('Employee Request'!$C$3:$C$33,"=" & $C3)-(COUNTIFS('Employee Request'!$C$3:$C$33,"=" & $C3,'Employee Request'!$D$3:$D$33,"=Done")+COUNTIFS('Employee Request'!$C$3:$C$33,"=" & $C3,'Employee Request'!$D$3:$D$33,"=Rejected"))
 
Upvote 0
Is that just the first in the list regardless? or is there a logic to the order of the source data? As in, descending by decision date or submission date<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
if someone has 7 outstanding Vacation requests is that relevant compared to someone who has one)
<o:p> </o:p>
you probably need to create a pivot table of the source but getting the first of anything in excel depends on order and magnitude
<o:p> </o:p>
VLOOKUP probably won’t get you what you need BUT
<o:p> </o:p>
From the example getting the first entry by employee number would need the source workbook sorted by employee number then sorted by decision date (descending?) or submission date and hoping the first in list isn’t done hiding the next in list which might be Under consideration…..<o:p></o:p>

You need to know what you’re trying to achieve

at least with the "countifs" you know when you have something relevant
(obviously you should change the address items to suit your data)

=COUNTIFS('Employee Request'!$C$3:$C$33,"=" & $C3)-(COUNTIFS('Employee Request'!$C$3:$C$33,"=" & $C3,'Employee Request'!$D$3:$D$33,"=Done")+COUNTIFS('Employee Request'!$C$3:$C$33,"=" & $C3,'Employee Request'!$D$3:$D$33,"=Rejected"))

I think you are right...
I think the countif will do just fine...
thank you for your time and assitance.
appreciate it
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,866
Members
452,948
Latest member
UsmanAli786

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