How to add to the value of one cell an amount that depends upon the range of a different cell?
A user of Web Applications asked how to:
- +1 when the value is >=5,
- +2 when the value is >=10,
- +3 when the value is >=15,
- +4 when the value is >=20,
- +5 when the value is >=25
and had tried:
in Google Sheets without success. The formula does however indicate that the 'value' resides in
F7 and supplementation is of the
As explained by an answer that retains the original concept of nested IFs:
=IF( F7>=25,H7+5, IF( F7>=20,H7+4, IF( F7>=15,H7+3, IF( F7>=10,H7+2, IF(F7>=5,H7+1,H7) ) ) ) )
If the first condition is F7>=5 then the result will always be +1 wether F7 = 5, 15, or even 200. It's because the first condition F7>=5 is always met.
Stepping down the ranges does achieve the desired result but is there a shorter of more versatile solution, since nested IFs with ranges are often problematic?