A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Dear MichalRama
If your requirement is to select multiple areas in different sheet, you can add the SUM formula in the formula =SUM(COUNTIFS(INDIRECT({"'P'!D:D";"'R'!D:D"}),"Example")) like the screenshot below:
Sincerely,
Stacey | Microsoft Community Moderator