That works, but here is also an easier way
=max(a1,b1)
it returns the max of any of the arguments there, and you can go as many cells as you need to.
You can do the same thing with the total clls.
For more then two columns, the max command is much easier then nesting if then's.