Compare 2 cells and display highest in 3rd cell

Is there way to compare 2 cells then display highest in a 3rd cell?

How about =IF(A2>B2;A2;B2)

Or just MAX(A2;B2)

3 Likes