Clear out words, multiplikation, addition

In other words, the application is just putting an HTML table into the clipboard, and the numbers appear to be in columns 1 and 3 (with a label in col 2).

1 Week 1
2 Week 1
0.8 Week 1

If that pattern is consistent, it might (at the risk of over-engineering) be possible to derive the sum with an XQuery expression like:

let $lines := (
    for $tr in //tr
        return number($tr/td[1]) * number($tr/td[3])

return sum($lines)

Test Macros.kmmacros (20 KB)

( A macro and two subroutines – enable all three to test )