Excel help With if statement

%3CLINGO-SUB%20id%3D%22lingo-sub-1415187%22%20slang%3D%22en-US%22%3EExcel%20help%20With%20if%20statement%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1415187%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3BI%20have%20a%20O-C%20column%20with%20variable%20values%20and%20I%20want%20to%20clone%20them%20in%20the%20new%20cells%20you%20can%20see%20in%20the%20image%20in%20the%20same%20rows%20and%20I%20only%20want%20to%20get%20the%20required%20vales%20and%20the%20rest%20of%20the%20cell%20should%20remain%20empty%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20Idea%20is%20like%20this%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eif%20(%20cell_value%20%26gt%3B%202%20and%20%26lt%3B%2020%20)%20and%20(%20next%20cell_value%20%26gt%3B%2020%20)%20print%3C%2FP%3E%3CP%3Eif%20(%20cell_value%20%26gt%3B%2050%20)%20and%20(%20next%20cell_value%20%26gt%3B%2020%20)%20print%3C%2FP%3E%3CP%3Eif%20(%20cell_value%20%26lt%3B%200%20)%20and%20(%20next%20cell_value%20%26gt%3B%2020%20and%20%26lt%3B%2040)%20and%20(%20next%20cell_value%20%26gt%3B%2020%20and%20%26lt%3B%2040%20)%20print%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1415187%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1415218%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20help%20With%20if%20statement%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1415218%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F678451%22%20target%3D%22_blank%22%3E%40nicolewiggins20%3C%2FA%3E%26nbsp%3Blet%20say%20your%20%22O-C%20column%22%20is%20column%20A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20F2%3A%20%3DIF(AND(AND(%24A2%26gt%3B2%2C%20%24A2%26lt%3B20)%2C%24B2%26gt%3B20)%2C%24A2%2CIF(AND(%24A2%26gt%3B50%2C%24B2%26gt%3B20)%2C%24A2%2CIF(AND(%24A2%26lt%3B0%2CAND(%24B2%26gt%3B20%2C%24B2%26lt%3B40)%2CAND(%24C2%26gt%3B20%2C%24C2%26lt%3B40))%2C%24A2%2C%22%22)))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Visitor

Hi All,

   I have a O-C column with variable values and I want to clone them in the new cells you can see in the image in the same rows and I only want to get the required vales and the rest of the cell should remain empty  

 

The Idea is like this

 

if ( cell_value > 2 and < 20 ) and ( next cell_value > 20 ) print

if ( cell_value > 50 ) and ( next cell_value > 20 ) print

if ( cell_value < 0 ) and ( next cell_value > 20 and < 40) and ( next cell_value > 20 and < 40 ) print

 

1 Reply
Highlighted

@nicolewiggins20 let say your "O-C column" is column A

 

On F2: =IF(AND(AND($A2>2, $A2<20),$B2>20),$A2,IF(AND($A2>50,$B2>20),$A2,IF(AND($A2<0,AND($B2>20,$B2<40),AND($C2>20,$C2<40)),$A2,"")))