Hello, Is there a way to use the rank function when the range cells occasionally has a cell with #N/A?

For example:

CellA(range to rank) CellB(rank)

5 1
10 2
15 3
#N/A #N/A
25 5
20 4

Thanks!