# How to take the highest of 2 numbers for division over the smaller

✭✭

Hi all!

I have two columns I would like to divide, however, it has to be the high number divided by low number. See my attachment.

For example because FirstNew is a bigger number, it will have to be 5/3

However, in some cases the bigger number could be in FirstOld which would have to be 7/3

What would be the formula so that it will automatically pick the largest number to be divided by the smallest? Thank you!

• ✭✭✭✭✭✭

Hey @Robert K

Try this

=IF(AND(ISNUMBER(FirstOld@row), ISNUMBER(FirstNew@row)), IF(FirstOld@row >=FirstNew@row, FirstOld@row / FirstNew@row, FirstNew@row / FirstOld@row))

First, the formula checks to make sure both columns are populated then it checks to see if FirstOld is larger than FirstNew. If it is, it does the math, otherwise, it swaps to the opposite column as the numerator.

Will this work for you

Kelly

• ✭✭✭✭✭✭

Hey @Robert K

Try this

=IF(AND(ISNUMBER(FirstOld@row), ISNUMBER(FirstNew@row)), IF(FirstOld@row >=FirstNew@row, FirstOld@row / FirstNew@row, FirstNew@row / FirstOld@row))

First, the formula checks to make sure both columns are populated then it checks to see if FirstOld is larger than FirstNew. If it is, it does the math, otherwise, it swaps to the opposite column as the numerator.

Will this work for you

Kelly

• ✭✭

Thank you Kelly! It works

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!