Forum Discussion

Startsun's avatar
Startsun
Copper Contributor
Jan 17, 2024

An error in the formula that chatGPT made me

=IF(A1<=10, A2*0.4, IF(AND(A1>10, A1<=50), A2*0.2, IF(AND(A1>50, A1<=200), A2*0.1, ""))) < A3, "Yes", "No")

Condition for the formula:

You need to determine in which range of numbers the number in cell A1 is located. If it is in the range from 1 to 10, then 60% is subtracted from A2, if it is not included in this range, then we determine whether it is in the range from 1 to 50, if so, then 80% must be subtracted from A2. If it is not in this range, then we determine whether it is in the range from 1 to 200, if so, then we subtract 90% from A2. If the resulting value is less than in cell A3, the value “Yes” will be displayed, if less than “No”

8 Replies

  • Rodrigo_'s avatar
    Rodrigo_
    Iron Contributor

    Startsun 
    "If the resulting value is less than in cell A3, the value “Yes” will be displayed, if less than “No”"
    > I assume if it is less than in cell A3, then "Yes", if it's greater than in cell A3, "No")

     

    =IF(IFS(A1<=10,A2*0.4,AND(A1>10,A1<=50),A2*0.2,AND(A1>50,A1<=200),A2*0.1)<A3,"Yes","No")

     

Resources