Forum Discussion
Chris Fernandez
Jun 13, 2017Copper Contributor
Formula Help Please
I have an average number in one cell and if it falls in between 2 numbers located in 2 seperate cells i want it to read "Pass" or "Fail" if it's outside the parameters in a seperate cell.
- Zachary GrotovskyBrass Contributor
No need to over complicate things, you can use the following simple formula:
=IF(AND(G4>H4,G4<I4),"Pass","Fail")Hi Zachary,
1) It's misprint in your formula, correct syntax as in Vladislavs' post
2) I really don't understand why Detlefs' variant is complex and/or less preferable...
- Zachary GrotovskyBrass ContributorThanks for pointing out the forgotten peren. To me cell references use less features than named ranges, which makes it easier and less complicated. The functionality will be the same, but referencing cells instead of named ranges seems easier to me.
- Vladislav BoretsCopper Contributor
I think this is better:
=IF(AND(AverageNumber>=Lower;AveregeNumber<=Upper),"Pass","Fail")
- Detlef_LewinSilver Contributor
Hello Vladislav
Why is it better?
Why?
- Detlef_LewinSilver Contributor
Hello Chris
=IF(MEDIAN(AverageNumber,Lower,Upper)=AverageNumber,"Pass","Fail")
- Chris FernandezCopper Contributor
What can i add to this formula to hide the error message when cell refernces aren't in the cell? I tried adding if(c4=0,"", then your formula), but it messes thing up. Thanks again in advance.
- Zachary GrotovskyBrass Contributoruse IFERROR(your formula here,"")
- Chris FernandezCopper Contributor
Thanks for the assist guys, but neither worked for my particular application. Here is a visual of what i'm trying to accomplish. If F4 is <H8 or >I4 it should read Q4. If it falls betrween the 2 parameters it should read Q5. Thaks again in advance.
- Detlef_LewinSilver Contributor
Both formulas work fine.
I can't see your formula in the screenshot.