Forum Discussion

areis1643's avatar
areis1643
Copper Contributor
Feb 28, 2024

what is the problem in this formula

=SUMPRODUCT(IF(ISNUMBER(FILTERXML("<t><s>" & TEXTJOIN("</s><s>", TRUE, H9:H100) & "</s></t>", "//s")), FILTERXML("<t><s>" & TEXTJOIN("</s><s>", TRUE, H9:H100) & "</s></t>", "//s"), 0))

 

thank you everyone for help.

  • JacobWilcox's avatar
    JacobWilcox
    Copper Contributor
    I've found it helpful to ask these "what's wrong" questions to chat GPT and see what it gives you. It's not always perfect, but it's an immediate response that you can try out.
  • areis1643 

    Nothing is wrong with formula, but it depends on which kind of values you have in H9:H100. Plus it's not necessary to use FILTERXML on 365, TEXTSPLIT could work.

    • areis1643's avatar
      areis1643
      Copper Contributor

      SergeiBaklanhi thanx for your answer. i want to calculate total amount of yellow colored numbers on the right side of the photo.

      • SergeiBaklan's avatar
        SergeiBaklan
        MVP

        areis1643 

        Do you mean extract numbers from texts and sum them, e.g. 700N, 400N => 700+400=>1100

        or just count number of values which are not equal to "*" ? If so the answer for above will be 2

Resources