A | B | C | D | |
---|---|---|---|---|
1 | Product | sales_volume | purchase_volume | Check |
2 | Product_A | 500 | 400 | yes |
3 | Product_B | 600 | 700 | |
4 | Product_C | 300 | 250 | |
5 | Product_D | 800 | 620 | |
6 | Product_E | 100 | 100 | |
7 |
In Cell D2
I want to have a formula that is doing the following:
= If there is at least one value in Column C > value in Column B then "yes" else "no"
I know I could achieve this with a Helper Column
that subtracts the values from both Columns and then check the Helper Column for values >= 0.
However, I would prefer a solution without a Helper Column
.
Do you have any idea if this is possible?
CodePudding user response:
=IF(SUM(IF(C2:C6>B2:B6, 1, 0))>0, "yes", "no")
Be warned this is an array formula so might required you to press Ctrl Shift Enter after typing the formula instead of just inserting it normally
CodePudding user response:
If B2 is GREATER than the largest number in the range C2:C6, then "no", else "yes".
Try this formula in cell D2:
=IF(B2>MAX(C$2:C$6),"no","yes")
you can then drag the formula down to other cells