If + Vlookup difficult search compare

Parvin_B

New Member
Joined
Oct 25, 2021
Messages
8
Office Version
  1. 365
Hi from A15 : A27 this is the list with drop downs and dropdown are Priority level , and i have priorities. In K5 . i want to get value from list if list from A15 : A27. If list have any At risk , in K5 it must show At risk dont need to check other cells , if list doesnt contain At risk it must check Delayed , if any cell has delayed it must show delayed , no need to check others, then it need to check On-Track , Yet to start . For Complete if all are complete it need to show complete . I wrote some code but it is not working =IF(VLOOKUP(J5,B15:B27,1,0)="At Risk","At-Risk", IF(VLOOKUP(J6,B15:B27,1,0)="Delayed","Delayed", IF(VLOOKUP(J7,B15:B27,1,0)="On-Track","On-Track","x "))) can anyone help me?

1635171632265.png
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi & welcome to MrExcel.
How about like
Excel Formula:
=IF(COUNTIFS(B:B,J5),"At Risk",IF(COUNTIFS(B:B,J6),"Delayed",""))
 
Upvote 0
can you use a countif()
as a nested IF/IFS

What cell do you want the results in - ALL IN K5
or move down the list ?
 
Upvote 0
MrExcelPlayground4.xlsx
ABCDEFGHIJK
4PhaseStatusPriority Level
5Plan and DesignCompleteAt Risk 
6Plan and DesignCompleteDelayedDelayed
7Plan and DesignCompleteOn-Track 
8Plan and DesignCompleteYet to Start 
9Plan and DesignCompleteComplete 
10Plan and DesignComplete
11Plan and DesignComplete
12Plan and DesignComplete
13Plan and DesignComplete
14Plan and DesignComplete
15Build and testDelayed
16Build and testYet to Start
17Build and testOn-Track
18Build and testOn-Track
19Build and testOn-Track
20Build and testOn-Track
21Build and testOn-Track
22Build and testOn-Track
23Build and testOn-Track
24Build and testOn-Track
25Build and testDelayed
26Build and testDelayed
27Build and testOn-Track
28Communication & TrainingYet to Start
29Communication & TrainingYet to Start
30Communication & TrainingYet to Start
31Communication & TrainingYet to Start
32Communication & TrainingYet to Start
33Communication & TrainingYet to Start
34DeploymentYet to Start
35DeploymentYet to Start
36DeploymentYet to Start
37StabilizationYet to Start
BCA
Cell Formulas
RangeFormula
K5K5=IF(COUNTIF($B$5:$B$27,J5)=0,"","At Risk")
K6K6=IF(COUNTIF($B$5:$B$27,J6)=0,"",IF(K5="","Delayed",""))
K7K7=IF(COUNTIF($B$5:$B$27,J7)=0,"",IF(AND(K5="",K6=""),"On-Track",""))
K8K8=IF(COUNTIF($B$5:$B$27,J8)=0,"",IF(AND(K5="",K6="",K7=""),"Yet to Start",""))
K9K9=IF(COUNTIF($B$15:$B$27,J9)=13,"Complete","")
 
Upvote 0
MrExcelPlayground4.xlsx
ABCDEFGHIJK
4PhaseStatusPriority Level
5Plan and DesignCompleteAt Risk 
6Plan and DesignCompleteDelayedDelayed
7Plan and DesignCompleteOn-Track 
8Plan and DesignCompleteYet to Start 
9Plan and DesignCompleteComplete 
10Plan and DesignComplete
11Plan and DesignComplete
12Plan and DesignComplete
13Plan and DesignComplete
14Plan and DesignComplete
15Build and testDelayed
16Build and testYet to Start
17Build and testOn-Track
18Build and testOn-Track
19Build and testOn-Track
20Build and testOn-Track
21Build and testOn-Track
22Build and testOn-Track
23Build and testOn-Track
24Build and testOn-Track
25Build and testDelayed
26Build and testDelayed
27Build and testOn-Track
28Communication & TrainingYet to Start
29Communication & TrainingYet to Start
30Communication & TrainingYet to Start
31Communication & TrainingYet to Start
32Communication & TrainingYet to Start
33Communication & TrainingYet to Start
34DeploymentYet to Start
35DeploymentYet to Start
36DeploymentYet to Start
37StabilizationYet to Start
BCA
Cell Formulas
RangeFormula
K5K5=IF(COUNTIF($B$5:$B$27,J5)=0,"","At Risk")
K6K6=IF(COUNTIF($B$5:$B$27,J6)=0,"",IF(K5="","Delayed",""))
K7K7=IF(COUNTIF($B$5:$B$27,J7)=0,"",IF(AND(K5="",K6=""),"On-Track",""))
K8K8=IF(COUNTIF($B$5:$B$27,J8)=0,"",IF(AND(K5="",K6="",K7=""),"Yet to Start",""))
K9K9=IF(COUNTIF($B$15:$B$27,J9)=13,"Complete","")
All in one cell
 
Upvote 0
Have you tried the formula I suggested in post#2?
 
Upvote 0
Then @Fluff formula extended for all the different conditions
As you have 365 then IFS () will work
=IFS( Countif(A15 : A27,J5)>0, "At Risk",Countif(A15 : A27,J6)>0,"Delayed",Countif(A15 : A27,J7)>0,"On-Track",Countif(A15 : A27,J8)>0, "yet to start" , Countif(A15 : A27,J9)>0, "complete", TRUE , "X")

OR
=IFS( Countif(A15 : A27,J5)>0, J5,Countif(A15 : A27,J6)>0,J6,Countif(A15 : A27,J7)>0,J7,Countif(A15 : A27,J8)>0, J8, Countif(A15 : A27,J9)>0, J9, TRUE , "X")

for older versions of excel

=IF( Countif(A15 : A27,J5)>0, J5, IF(Countif(A15 : A27,J6)>0,J6, IF( Countif(A15 : A27,J7)>0,J7, IF(Countif(A15 : A27,J8)>0, J8, IF(Countif(A15 : A27,J9)>0, J9, "X")))))

for complete ALL cells have to be complete
Then
=IF( Countif(A15 : A27,J5)>0, J5, IF(Countif(A15 : A27,J6)>0,J6, IF( Countif(A15 : A27,J7)>0,J7, IF(Countif(A15 : A27,J8)>0, J8, IF(Countif(A15 : A27,J9)=13, J9, "X")))))
But its unlikely to get to complete unless all cells are complete OR cells are left blank i guess or have anything other than the previous conditions

BUT a test of the count to be 13 which will be all the cells have complete
 
Last edited:
Upvote 0
Solution
Then @Fluff formula extended for all the different conditions
As you have 365 then IFS () will work
=IFS( Countif(A15 : A27,J5)>0, "At Risk",Countif(A15 : A27,J6)>0,"Delayed",Countif(A15 : A27,J7)>0,"On-Track",Countif(A15 : A27,J8)>0, "yet to start" , Countif(A15 : A27,J9)>0, "complete", TRUE , "X")

OR
=IFS( Countif(A15 : A27,J5)>0, J5,Countif(A15 : A27,J6)>0,J6,Countif(A15 : A27,J7)>0,J7,Countif(A15 : A27,J8)>0, J8, Countif(A15 : A27,J9)>0, J9, TRUE , "X")

for older versions of excel

=IF( Countif(A15 : A27,J5)>0, J5, IF(Countif(A15 : A27,J6)>0,J6, IF( Countif(A15 : A27,J7)>0,J7, IF(Countif(A15 : A27,J8)>0, J8, IF(Countif(A15 : A27,J9)>0, J9, "X")))))
Thank you man , can i change J5 with At Risk or other values like Countif(A15 : A27, "At Risk") ?
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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