Xlookup

Garetht2014

New Member
Joined
Oct 21, 2014
Messages
23
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am trying to create a formula for the below where the 'Plan In' column will auto populate with a Yes or No depending on some criteria in other work sheets which are ELF, PROD & absences.

My current formula is this which works without looking at the Absences sheet.

=IF(AND(XLOOKUP([@Name],ELF!A:A,ELF!H:H,"",0) <0.35, (XLOOKUP([@Name],Prod!A:A,Prod!O:O,"",0)>0.8)), "Yes", "No")

I now want to add in information about absences and want to modify the formula above to include this. The end result of the formula is to return a Yes if the the ELF is under 0.35, PROD is above 0.8 and total amount of absences are below 10. If someone doesn't meet all 3 criteria then it just returns a NO in the plan in column.


This is the formula I have tried which it isn't working but don't understand what is wrong:

IF(AND(XLOOKUP([@Name],ELF!A:A,ELF!H:H,"",0) <0.35, (XLOOKUP([@Name],Prod!A:A,Prod!O:O,"",0)>0.8)), (XLOOKUP([@Name],Absences!A:A,Absences!T:T,"",0)>10)), "Yes", "No")

NameTerritoryManagerPlan inAbsences
Joe Bloggs 1WalesManager 1Yes
Joe Bloggs 2WalesManager 2No

Absence sheet layout:
Engineer NameAMGMLength of ServiceJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecemberJanuaryFebruaryMarchTotal
Joe Bloggs 18207266251
Joe Bloggs 23913221684443



Appreciate any guidance someone can give.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
that you want below 10

(XLOOKUP([@Name],Absences!A:A,Absences!T:T,"",0)>10)
but this XlookUp formula describes values above 10


so try like this
Excel Formula:
IF(AND(XLOOKUP([@Name],ELF!A:A,ELF!H:H,"",0) <0.35, (XLOOKUP([@Name],Prod!A:A,Prod!O:O,"",0)>0.8)), (XLOOKUP([@Name],Absences!A:A,Absences!T:T,"",0)<10)), "Yes", "No")
 
Upvote 0
Thank you for that.

I have tried the formula you posted but get this message:

1710410936205.png
 
Upvote 0
Try it like
Excel Formula:
=IF(AND(XLOOKUP([@Name],ELF!A:A,ELF!H:H,"",0) <0.35, XLOOKUP([@Name],Prod!A:A,Prod!O:O,"",0)>0.8, XLOOKUP([@Name],Absences!A:A,Absences!T:T,"",0)<10), "Yes", "No")
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0
Ok, I have found a problem that can't fix! which was something I hadn't picked up on till now unfortunately.
I have noticed that if the name of the person I am looking for is not on the absence spreadsheet it returns "Do Not Plan: High Absence". So I had another go at trying to resolve this but have come unstuck.

Currently I have this unfinished formula I am testing but it keep returning ERROR when the ELF is over 3.5%, but it should return "Do Not Plan, High ELF", but I am also getting an error when the ELF is below 3.5%, Prod above 80% and Absences below 10 when it should return "Plan In" but I am getting error!

My requirement for the formula is if the below requirements are met return "Plan In", if one of the conditions are not met return a message with the reason (i.e. Do Not Plan: High ELF, Do Not Plan: Low Prod, Do Not Plan: High Absences or any mixture of the 3 (Do Not Plan: High ELF, Low Prod):

Absences under 10
ELF under 3.5%
Prod over 80%

=IF(OR([@Absences]="",[@Absences]=0),
IF(AND([@[Elf ]]<0.35,[@[Prod ]]>0.8,[@Absences]<10),
"Plan In",
IF(AND([@[Elf ]]>0.35,[@[Prod ]]<0.8),
"Do Not Plan, High ELF, Low Prod",
IF(AND([@[Elf ]]>0.35,[@[Prod ]]>0.8),
"Do Not Plan, High ELF",
IF(AND([@[Elf ]]<0.35,[@[Prod ]]<0.8),
"Do Not Plan, Low Prod",
"ERROR"
)
)
)
),
"ERROR"
)


Column1ElfProdAbsences
ERROR​
4%​
83%​
2​
Plan In​
0%​
82%​
0​
ERROR​
2%​
86%​
2​
 
Upvote 0
As this is a completely different question, it needs a new thread. Thanks
 
Upvote 0
Ok, thought it was ok here as it is just a variation on what you helped with before.
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

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