Excel

%3CLINGO-SUB%20id%3D%22lingo-sub-2732451%22%20slang%3D%22en-US%22%3EExcel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2732451%22%20slang%3D%22en-US%22%3E%3CP%3EI%20want%20to%20compare%20multiple%20cells.%20If%20H4%20has%20the%20letter%20Y%2C%20then%20I%20want%20B4%20to%20have%20the%20number%2071%20or%20if%20C4%26lt%3B1%2C%20then%20return%2071%2C%20if%20C4%20equals%201%20then%20return%2031%20or%20if%20C4%20is%20greater%20than%201%20return%201%20in%20B4.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20the%20formula%20I%20tried%20using%20and%20it%20is%20not%20working%3A%3C%2FP%3E%3CP%3E%3DIF(OR(H4%3DY%2C%20%2271%22%2CIF(C4%26lt%3B1%2C%2271%22%2CIF(C4%3D1%2C%2231%22%2CIF(C4%26gt%3B1%2C%221%22)))))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20is%20greatly%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2732451%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-2732577%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2732577%22%20slang%3D%22en-US%22%3EConsider%20the%20OR(H4%3D%22Y%22%2CH4%26lt%3B1)%20this%20way%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2732605%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2732605%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1149872%22%20target%3D%22_blank%22%3E%40SAIKEN140%3C%2FA%3E%26nbsp%3BPerhaps%20like%20this%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DIF(OR(H4%3D%22Y%22%2CC4%26lt%3B1)%2C71%2CIF(C4%3D1%2C31%2C1))%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
New Contributor

I want to compare multiple cells. If H4 has the letter Y, then I want B4 to have the number 71 or if C4<1, then return 71, if C4 equals 1 then return 31 or if C4 is greater than 1 return 1 in B4. 

 

Here is the formula I tried using and it is not working:

=IF(OR(H4=Y, "71",IF(C4<1,"71",IF(C4=1,"31",IF(C4>1,"1")))))

 

Any help is greatly appreciated.

4 Replies

Consider the OR(H4="Y",C4<1) this way

or 


=IF((H4="Y")+(C4<1),71,IF(C4=1,31,1))

 

=IF((H4="Y")+(C4<1),71,IF(C4=1,31,1))

 

 

@SAIKEN140 Perhaps like this:

=IF(OR(H4="Y",C4<1),71,IF(C4=1,31,1))

@SAIKEN140 

In B4:

 

=IF(OR(H4="Y",C4<1),71,IF(C4=1,31,1))

Thank you! This works for what I needed!