I have a requirement to sum certain values from a dynamically changing pivot table. What I mean by dynamically changing is that the no of rows and no of columns in the pivot table might change dynamically when the pivot table filters are modified. Under this circumstances, I want to get the sum of values based on dual criteria for row label and column label.

To be more clear here is an example.

Apples Mango Pineapples Oranges
Jan-12 23 34 56 35
Feb-12 56 36 47 35
Mar-12 12 45 24 6

I need to get the sum of values of Jan-12 row where the column string matches "*pple*" i.e., for apples and pineapples. The expected answer is 23+56 = 79.

Which combination of Excel functions can I use to get this.

Note that this table row count and column count will change dynamically. In that case, if Jan-12 is unavailable, the result value should automatically show 0.