SOLVED

Excel Formula Help IF AND STATEMENT

%3CLINGO-SUB%20id%3D%22lingo-sub-2282609%22%20slang%3D%22en-US%22%3EExcel%20Formula%20Help%20IF%20AND%20STATEMENT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2282609%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20I%20in%20need%20of%20assistance%20creating%20a%20single%20statement%20reflecting%20two%20columns%3A%20WorkType%20and%20Hours.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20WorkType%20%3D%20%22OH%22%20and%20Hours%20%26gt%3B%3D10%2C%20%22KEEP%22%2C%20%22DELETE%22%3C%2FP%3E%3CP%3EIf%20WorkType%26lt%3B%26gt%3B%26nbsp%3B%22OH%22%20and%20Hours%20%26gt%3B%3D20%2C%20%22KEEP%22%2C%20%22DELETE%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20whatever%20reason%2C%20I%20cannot%20make%20a%20single%20statement%20that%20fits%20both%20criterion%20that%20works%20for%20my%20worksheet.%20I%20have%20attached%20it%20below.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2282609%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2282633%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%20IF%20AND%20STATEMENT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2282633%22%20slang%3D%22en-US%22%3EFunny%20enough%2C%20I%20came%20up%20with%3CBR%20%2F%3E%3DIF(OR(AND(A2%3D%22OH%22%2CB2%26gt%3B%3D10)%2CAND(A2%26lt%3B%26gt%3B%22OH%22%2CB2%26gt%3B%3D20))%2C%22Keep%22%2C%22Delete%22)%20moments%20after%20you%20sent%20this.%20Thank%20you%2C%20this%20stumped%20me%20yesterday.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2282631%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%20IF%20AND%20STATEMENT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2282631%22%20slang%3D%22en-US%22%3EThank%20you%20so%20much.%20This%20worked%20out%20great.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2282625%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Formula%20Help%20IF%20AND%20STATEMENT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2282625%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1034977%22%20target%3D%22_blank%22%3E%40BraytonM%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20C2%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIF(B2%26gt%3B%3DIF(A2%3D%22OH%22%2C10%2C20)%2C%22KEEP%22%2C%22DELETE%22)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFill%20down%2F%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello, I in need of assistance creating a single statement reflecting two columns: WorkType and Hours. 

 

If WorkType = "OH" and Hours >=10, "KEEP", "DELETE"

If WorkType<> "OH" and Hours >=20, "KEEP", "DELETE"

 

For whatever reason, I cannot make a single statement that fits both criterion that works for my worksheet. I have attached it below. 

3 Replies
best response confirmed by BraytonM (New Contributor)
Solution

@BraytonM 

In C2:

 

=IF(B2>=IF(A2="OH",10,20),"KEEP","DELETE")

 

Fill down/

Thank you so much. This worked out great.
Funny enough, I came up with
=IF(OR(AND(A2="OH",B2>=10),AND(A2<>"OH",B2>=20)),"Keep","Delete") moments after you sent this. Thank you, this stumped me yesterday.