XLookup's

Garetht2014

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

I have the below sheet I am working on and need a formula to return certain messages depending on the outcome of results.

My basic criteria is if the below conditions are met then in Column 1 it gives me the message 'Plan In' if the conditions are not met it gives me a message of 'Do Not Plan: High ELF' or 'Do Not Plan: High Absences' or 'Do Not Plan: Low Prod' or any combination of the 3 (Do Not Plan: High ELF, Low Prod' for instance.

To meet the criteria for 'Plan In' the below must be met:

ELF - less that 3.5%
Prod - 80% or higher
Absences - 10 or Less

In Column D there is an unfinished formula because I can not get it to work correctly, all it returns is 'ERROR' even though 2 of the rows (4 & 7) meet the criteria and should say 'Plan In'! What I have noticed is that if I change the absences to 0 then it will give me the message that meets the criteria for Plan In or one of the other messages for Do no Plan in, so I know it is something to do with the Absences part of the formula but can't work it out, even tried ChatGPT but that didn't work either :LOL:


Please can someone help me with this ?



Copy of Saturday Approval (version 1) - testing one.xlsx
ABCDFGHI
1NameTerritoryResource ManagerColumn1Elf Prod AbsencesWhat is should say
2Joe Bloggs 1Avon and SomersetManager 1ERROR5%83%2Do Not Plan: High ELF
3Joe Bloggs 2East Wales and GloucestershireManager 1ERROR0%90%11Do Not Plan: High Absences
4Joe Bloggs 3Avon and SomersetManager 1ERROR0%82%2Plan In
5Joe Bloggs 4Avon and SomersetManager 1ERROR3%78%2Do Not Plan: Low Prod
6Joe Bloggs 5Avon and SomersetManager 1ERROR6%75%11Do not Plan: High ELF, Low Prod, High Absences
7Joe Bloggs 6Avon and SomersetManager 1ERROR3%94%1Plan in
8Hassun SalimEast Wales and GloucestershireManager 1ERROR5%78%1Do not Plan: High ELF, Low Prod
9Jack LathamEast Wales and GloucestershireManager 1ERROR1%74%12Do Not Plan: Low Prod High Absences
Low volume do not plan list
Cell Formulas
RangeFormula
D2:D9D2=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" )
F9F9=XLOOKUP([@Name], ELF!A:A, ELF!H:H, "", 0)
G9G9=XLOOKUP([@Name], Prod!A:A, Prod!O:O, "", 0)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D8:I177,D2:H7Cell Value="Plan in"textNO
D8:I177,D2:H7Cell Valuecontains ""textNO
Cells with Data Validation
CellAllowCriteria
A2:A177Text length<=100
B2:B177Any value
C2:C177Any value
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
copied into a sheet from xl2bb and had issues
ELF - less that 3.5%
Prod - 80% or higher
Absences - 10 or Less

=IF( AND(F2 <0.035 , G2>0.8 , H2<=10 ), "Plan In" , IF(

trying to work out the other conditions
as absense H - does seem to be included

which i think are

IF(AND([F2>0.35,G2<0.8), "Do Not Plan, High ELF, Low Prod",
IF(AND([F2>0.35,G2>0.8), "Do Not Plan, High ELF",
IF(AND([F2<0.35,G2<0.8), "Do Not Plan, Low Prod",

F2 / G2 / H2 / expected
0.05 / 0.827272727 / 2 / Do Not Plan: High ELF

in this case
F2 is < 0.35
G2 is > 0,8

BUT to get the expected result
F2 needs to be >0.35 - which it is not


and you dont have a condition for that , so will get error

Book2
ABCDEFGHI
1NameTerritoryResource ManagerColumn1Elf Prod AbsencesWhat is should say
2Joe Bloggs 1Avon and SomersetManager 1Error0.050.8272727272Do Not Plan: High ELF
3Joe Bloggs 2East Wales and GloucestershireManager 1Error00.911Do Not Plan: High Absences
4Joe Bloggs 3Avon and SomersetManager 1Plan In00.8155339812Plan In
5Joe Bloggs 4Avon and SomersetManager 1Do Not Plan, Low Prod0.0344827590.782Do Not Plan: Low Prod
6Joe Bloggs 5Avon and SomersetManager 1Do Not Plan, Low Prod0.060.7511Do not Plan: High ELF, Low Prod, High Absences
7Joe Bloggs 6Avon and SomersetManager 1Plan In0.0256410260.9444444441Plan in
8Hassun SalimEast Wales and GloucestershireManager 1Do Not Plan, Low Prod0.050.781Do not Plan: High ELF, Low Prod
9Jack LathamEast Wales and GloucestershireManager 1Do Not Plan, High ELF=XLOOKUP([@Name], ELF!A:A, ELF!H:H, "", 0)=XLOOKUP([@Name], Prod!A:A, Prod!O:O, "", 0)12Do Not Plan: Low Prod High Absences
10Do Not Plan, Low Prod
11Do Not Plan, Low Prod
12Do Not Plan, Low Prod
Sheet1
Cell Formulas
RangeFormula
D2:D12D2=IF(AND(F2<0.035,G2>0.8,H2<=10),"Plan In",IF(AND(F2>0.35,G2<0.8),"Do Not Plan, High ELF, Low Prod",IF(AND(F2>0.35,G2>0.8),"Do Not Plan, High ELF",IF(AND(F2<0.35,G2<0.8),"Do Not Plan, Low Prod","Error"))))
 
Upvote 0

Forum statistics

Threads
1,215,072
Messages
6,122,968
Members
449,095
Latest member
Mr Hughes

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