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!
Best Answer
-
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
Answers
-
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
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!