Oct 25 2019 08:33 AM
I am trying to write a formula in my excel spreadsheet where I am using both greater than and less than symbols. The formula is using a calculation in another cell. If the number is below 1 then 1 is to be placed into the cell. If it is above 8, it is to place 8 there. If it is between these numbers, it places the actual number in the cell.
I know how to do a formula with only 1 variable, but I can not determine how to with both variables.
Appreciate any help
Alan
Oct 25 2019 08:39 AM
Oct 25 2019 01:42 PM - edited Oct 25 2019 01:43 PM
If you only have a handful of outcomes, I recommend using VLOOKUP with an approximate match instead of IF-logic. If you need to do between ranges then you'd need IF-AND. My approach is this.
Consider this example:
0 to 3 is "Low"
4 to 6 is "Medium"
7+ is "High"
A1 contains the number to be checked.
Formula:
=VLOOKUP(A1,{0,"Low";4,"Medium";7,"High"},2,1)