SOLVED

Help on Excel formula

%3CLINGO-SUB%20id%3D%22lingo-sub-2710695%22%20slang%3D%22en-US%22%3EHelp%20on%20Excel%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2710695%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Everyone%2C%3C%2FP%3E%3CP%3EGreeting%20for%20the%20day..!%3C%2FP%3E%3CP%3EI%20need%20help%20on%20creating%20the%20formula%20on%20excel%20for%20the%20below%20scenario%2C%20Kindly%20help%20me.%3C%2FP%3E%3CP%3EScenario%3A%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20sheet%201%2C%20we%20have%20a%20test%20case%20and%20corresponding%20status%20and%20depends%20on%20the%20status%20of%20those%20steps%20in%20one%20column%20we%20have%20to%20determine%20the%20final%20status%20and%20provide%20the%20same%20in%20the%20sheet2.%3C%2FP%3E%3CP%3EConditions%3A%3C%2FP%3E%3CP%3Eif%20all%20the%20steps%20are%20passed--%26gt%3Bit%20is%20considered%20as%20PASS%20and%20should%20be%20given%20as%20PASS%3C%2FP%3E%3CP%3Eif%20at%20least%20one%20step%20is%20failed--%26gt%3Bit%20is%20considered%20as%20fail%20test%20case%20in%20sheet2%3C%2FP%3E%3CP%3Eif%20there%20are%20combination%20of%20only%20Pass%20and%20In%20progress-%26gt%3BIt%20is%20considered%20as%20INPROGRESS%20status%20in%20sheet2%3C%2FP%3E%3CP%3Eif%20there%20are%20combination%20of%20only%20Pass%20and%20blocked-%26gt%3BIt%20is%20considered%20as%20blocked%20status%20in%20sheet2%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20find%20the%20sample%20sheet%20and%20let%20me%20know%20in%20case%20if%20you%20need%20any%20other%20information.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%26nbsp%3B%2C%20kindly%20help%20on%20this.%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2710695%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2710983%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20on%20Excel%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2710983%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1133065%22%20target%3D%22_blank%22%3E%40Dinesh0911%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFill%20in%20the%20test%20case%20in%20all%20rows%20of%20the%20Actual%20sheet.%20Otherwise%2C%20the%20formulas%20become%20very%20complicated.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22S0726.png%22%20style%3D%22width%3A%20320px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307592iFD05ACB3438C0273%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22S0726.png%22%20alt%3D%22S0726.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIn%20B2%20on%20the%20Expected%20sheet%3A%3C%2FP%3E%0A%3CP%3E%3DIF(COUNTIFS(Actual!%24A%3A%24A%2C%24A2%2CActual!D%3AD%2C%22fail*%22)%2C%22fail%22%2CIF(COUNTIFS(Actual!%24A%3A%24A%2C%24A2%2CActual!D%3AD%2C%22block*%22)%2C%22Blocked%22%2CIF(COUNTIFS(Actual!%24A%3A%24A%2C%24A2%2CActual!D%3AD%2C%22in%20progres*%22)%2C%22In%20Progress%22%2C%22Pass%22)))%3C%2FP%3E%0A%3CP%3EFill%20down%20and%20to%20the%20right.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2711304%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20on%20Excel%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2711304%22%20slang%3D%22en-US%22%3EThank%20you%20so%20much%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%2C%20it%20is%20working%20as%20I%20expected.%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello Everyone,

Greeting for the day..!

I need help on creating the formula on excel for the below scenario, Kindly help me.

Scenario: 

In sheet 1, we have a test case and corresponding status and depends on the status of those steps in one column we have to determine the final status and provide the same in the sheet2.

Conditions:

if all the steps are passed-->it is considered as PASS and should be given as PASS

if at least one step is failed-->it is considered as fail test case in sheet2

if there are combination of only Pass and In progress->It is considered as INPROGRESS status in sheet2

if there are combination of only Pass and blocked->It is considered as blocked status in sheet2

 

Please find the sample sheet and let me know in case if you need any other information.

 

@Hans Vogelaar , kindly help on this. 

Thanks in advance.

 

 

 

 

 

 

 

4 Replies
best response confirmed by Dinesh0911 (Occasional Contributor)
Solution

@Dinesh0911 

Fill in the test case in all rows of the Actual sheet. Otherwise, the formulas become very complicated.

S0726.png

In B2 on the Expected sheet:

=IF(COUNTIFS(Actual!$A:$A,$A2,Actual!D:D,"fail*"),"fail",IF(COUNTIFS(Actual!$A:$A,$A2,Actual!D:D,"block*"),"Blocked",IF(COUNTIFS(Actual!$A:$A,$A2,Actual!D:D,"in progres*"),"In Progress","Pass")))

Fill down and to the right.

Thank you so much @Hans Vogelaar, it is working as I expected.
@Hans Vogelaar, if all the step status are "N/A" it is being return as " Pass", Can you please help me for keeping the value as "N/A" when all the values are 'N/A"?

@Dinesh0911 

Like this:

 

=IF(COUNTIFS(Actual!$A:$A,$A2,Actual!D:D,"fail*"),"Fail",IF(COUNTIFS(Actual!$A:$A,$A2,Actual!D:D,"block*"),"Blocked",IF(COUNTIFS(Actual!$A:$A,$A2,Actual!D:D,"in progres*"),"In Progress",IF(COUNTIFS(Actual!$A:$A,$A2,Actual!D:D,"Pass")=0,"N/A","Pass"))))