I need to perform a division calculation using cells 50 & 51 if numbers are present, otherwise display “NA” in the result cell if either of the above cell contains “ND”. The F & G cells are merged.
Both of these formulas give a #VALUE! result in the cell below.

=IF(COUNT(F50:G51)="ND", "NA", F50:G50/F51:G51)
=IF(F50:G51="ND", "NA",F50/F51)

F G
50 112519
51 ND
52 #VALUE!


Thanks!