• Resolved alemitta

    (@alemitta)


    Me again,

    To finish my table i need a functions SUMIF but the condictions is not a number is YES or NO…

    In excel is this….

    =SUMIF(C2:C18; “SI”; D2:D18)

    When i put this functions in tablepress error message said that it is necessary conditions be a number. There are any form that the conditions can be yes or no?

    Thanks!

    https://wordpress.org/plugins/tablepress/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    No, sorry, string comparisions are not possible 🙁
    The IF function in TablePress can only understand numbers or numeric values.

    Regards,
    Tobias

    Thread Starter alemitta

    (@alemitta)

    Me again,

    And…Is it possible that when put NO in a field this file became in other color?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    not directly, and not with formulas. You would have to use some custom PHP code for this that, for example, hooks into the tablepress_cell_css plugin filter hook, and adds an extra CSS class to the cell, if the cell content is “NO”. With that CSS class, you can then set an extra background color in the cell.

    Regards,
    Tobias

    Thread Starter alemitta

    (@alemitta)

    Hi tobias,

    Me again.

    I not very expert in php, but i thinks would be something like this…

    <?
    if ($row[“Alquilado”]=NO)
    echo ‘<tr style=”background-color:#ff0000″>’;
    ?>

    But I cant find where put it.

    Thanks for your help.

    Thread Starter alemitta

    (@alemitta)

    <?
    if ($column[“Alquilado”]=NO)
    echo ‘<tr style=”background-color:#ff0000″>’;
    ?>

    Sorry

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no, that’s a little bit too easy. You would have to write a small custom WordPress plugin that uses add_filter() to hook into tablepress_cell_css_class, which gets passed several parameters, see https://github.com/TobiasBg/TablePress/blob/1.5.1/classes/class-render.php#L648
    That information can then be used for the check.
    You could maybe try using the other available TablePress Extensions as the starting point for your custom Extension.

    Regards,
    Tobias

    Thread Starter alemitta

    (@alemitta)

    I tried to do it but it is so difficult for me.

    Could you help me?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    I would love to, but unfortunately I just don’t have time to develop this Extension within the free support that I can offer, sorry 🙁

    Regards,
    Tobias

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Extra functions like excel.’ is closed to new replies.