Friends

Is it possible to do add two un related if functions together. By that I mean

Function 1
Produced a result x based on certain criteria. If you don't get X you get 0

Function 2
Produces a result y based on certain different criteria. If you don't get Y you get 0

In circumstances where you get X and Y I'd like to add those together to get Z

All help greatly received!

Farmer