Forum Discussion

Tomtom's avatar
Tomtom
Copper Contributor
Jan 22, 2025

Help creating a formula

Hi! What I need Excel to do is: 

If the value in column A is and the value in column B is between a certain range of numbers the answer is Y

If we have the same value in column A but the value in column B is between a different range of numbers the answer is Z

  • =IF(A2="X", IF(AND(B2>=1, B2<=50), "Y", IF(AND(B2>=101, B2<=150), "Z", "")), "")

    Adjust the ranges as needed.

  • =IF(A2="X", IF(AND(B2>=1, B2<=50), "Y", IF(AND(B2>=101, B2<=150), "Z", "")), "")

    Adjust the ranges as needed.

Resources