2 Replies Latest reply: Aug 29, 2011 11:35 AM by Davidson Machado RSS

    Function does not change color when the value is null or zero

    Davidson Machado

      Hello everybody!

       

      Please help me with the following question:

       

      I have a table where the text color changes according to the value of the cell. However, when the value is null or zero, the formula does not work. How can I do?

       

      Table:

       

      DEPTO. QTDE. PERCENTUAL
      ENG. 8 50%
      TRAF. 5 31%
      PED. 2 13%
      MKTAS 1 6%
      CAU 0 0%
      CRT 0 0%
      PA 0 0%
      Total 16 100%

       

       

      Code:

       

      if(siglaDepartamento='ENG.',

                RGB(0,168,0),

                if(siglaDepartamento='CRT',

                          RGB(255,0,0),

                          if(siglaDepartamento='TRAF.',

                                    RGB(255,0,255),

                                    if(siglaDepartamento='CAU',

                                              RGB(0,255,0),

                                              if(siglaDepartamento='MKTAS',

                                                        RGB(128,0,0),

                                                        if(siglaDepartamento='PA',

                                                                  RGB(255,255,0),

                                                                  if(siglaDepartamento='PED.',

                                                                            RGB(0,255,255),

                                                                            if(siglaDepartamento='VV',

                                                                                      RGB(132,0,0)

                                                                            )

                                                                  )

                                                        )

                                              )

                                    )

                          )

                )

      )

       

       

      Go!