Thanks Guys,

All your solutions work but I realise I have made one error they only work if there is a #N/A in the one or both cells. Can you suggest a solution?
There are three scenarios below - I need to pick up the 4 in Scenarios 1 and 2 and return a 0 for Scenario 3.Sorry for missing this.

Scenario 1
Column AF2 = 4
Column AH2 = #N/A

Scenario2
Column AF2 = #N/A
Column AH2 = 2

Scenario3
Column AF2 = #N/A
Column AH2 = #N/A