Forum Discussion

htrankevin's avatar
htrankevin
Copper Contributor
Sep 13, 2022

Need help with IF

Hi,   I have an If sentences here:  =IF(AND($B2=$B3;$F2="4410";$G3<>"0000-00");$G3;IF(AND($B3=$B4;$F2=4410;$G4<>"0000-00");$G4;IF(AND($B5=$B6;$F2=4410;$G5<>"0000-00");$G6;".")))   * I want to pr...
  • dscheikey's avatar
    Sep 13, 2022

    htrankevin 

    Hi Kevin, in your IF() question you refer once to a text "4410" and once to a number 4410. I don't know if this solves the problem yet, because I couldn't understand what you want to achieve at all. Perhaps you could describe the desired goal a little better.

     

    =IF(
      AND($B2=$B3,$F2="4410",$G3<>"0000-00"),
        $G3,
        IF(
          AND($B3=$B4,$F2=4410,$G4<>"0000-00"),
            $G4,
            IF(
              AND($B5=$B6,$F2=4410,$G5<>"0000-00"),
                $G6,
                "."
            )
        )
      )

    Shouldn't lines 8 and 9 read as follows?

    AND($B4=$B5,F2=4410,$G5<>"0000-00"),$G5

     

     

Resources