Home

Nested If Function Help

%3CLINGO-SUB%20id%3D%22lingo-sub-479458%22%20slang%3D%22en-US%22%3ENested%20If%20Function%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-479458%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20I%20was%20hoping%20someone%20might%20be%20able%20to%20help%20me%20with%20this%20formula%2C%20or%20tell%20me%20why%20I'm%20getting%20an%20error.%20I%20need%20to%20check%20if%20a%20number%20fits%20within%20a%20certain%20range%2C%20and%20if%20it%20does%2C%20do%20a%20specific%20calculation%2C%20then%20check%20another%20range%2C%20do%20a%20calculation%20if%20it%20fits%20there%2C%20and%20repeat%20until%20I%20want%20it%20to%20return%200%20if%20it%20does%20not%20fit%20within%20any%20of%20the%20multiple%20specified%20ranges.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20a%20simplified%20version%20of%20what%20I'm%20really%20trying%20to%20do%2C%20but%20I%20think%20it's%20easier%20solved%20and%20understanding%20what's%20wrong%20here%20will%20let%20me%20know%20what's%20wrong%20in%20the%20other%20one%20I'm%20working%20on.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20so%20much%20for%20any%20help.%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F109792i4AE9CE7E43A24404%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22excel.PNG%22%20title%3D%22excel.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-479458%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-479499%22%20slang%3D%22en-US%22%3ERe%3A%20Nested%20If%20Function%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-479499%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F324837%22%20target%3D%22_blank%22%3E%40accstudent%3C%2FA%3E%26nbsp%3B%2C%20the%3C%2FP%3E%0A%3CPRE%3E%3DIF(O23%26lt%3BB24%26lt%3BP23%2C..%3C%2FPRE%3E%0A%3CP%3Eis%20not%20correct%20syntax%2C%20you%20may%20use%3C%2FP%3E%0A%3CPRE%3E%3DIF(AND(O23%26lt%3BB24%2CB24%26lt%3BP23)%2C..%3C%2FPRE%3E%0A%3CP%3Eor%2C%20what%20is%20the%20same%3C%2FP%3E%0A%3CPRE%3E%3DIF((O23%26lt%3BB24)*(B24%26lt%3BP23)%2C..%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
accstudent
Occasional Visitor

Hi, I was hoping someone might be able to help me with this formula, or tell me why I'm getting an error. I need to check if a number fits within a certain range, and if it does, do a specific calculation, then check another range, do a calculation if it fits there, and repeat until I want it to return 0 if it does not fit within any of the multiple specified ranges.

 

This is a simplified version of what I'm really trying to do, but I think it's easier solved and understanding what's wrong here will let me know what's wrong in the other one I'm working on.

 

Thanks so much for any help.excel.PNG

1 Reply

@accstudent , the

=IF(O23<B24<P23,..

is not correct syntax, you may use

=IF(AND(O23<B24,B24<P23),..

or, what is the same

=IF((O23<B24)*(B24<P23),..

 

 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies