Hi, welcome to the board.
There are (possibly infinitely) many ways of merging the two formulas together.
But to do that in the way that YOU want, can you explain what the formulas should do, exactly, once they have been merged ?
Sorry, but this is not obvious to me.