Forum Discussion

rach1345's avatar
rach1345
Brass Contributor
Jan 25, 2023
Solved

Formula returning the wrong value

Hi, I have created a file where I have have asked excel to calculate fields based on the following but it not calculating the Pallet fields correctly if st = 3001 = "n/a", c2 = "in" ="gexpbook", e2...
  • dscheikey's avatar
    Jan 25, 2023

    rach1345 

    For such nested IF queries you can use the IFS function.

    According to your specifications, the formula should look like this:

    =IFS(B2=3001,"N/A",
    C2="IN","GEXPBOOK",
    E2="GDG","GDG",
    D2=1,"GLINE",
    AND(A2>0.1,A2<=53000),"G1CARTON",
    AND(A2>53000,A2<1000000),"G1>CARTON",
    A2=1000000,"G1PALLET",
    A2>1000000,"G>1PALLET",
    TRUE,"0")

     

Resources