Welcome to the Smartsheet Forum Archives
The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.
SmartSheet Function Similar to Excel MOD Function?
Comments
-
Carol,
No.
Do you only care about the binary result (either is a whole number or not) or do you need the actual result of the MOD (modulus) function?
Craig
-
Assuming the answer is binary, then try this:
=IF([Value1]23 / [Value2]23 > INT([Value1]23 / [Value2]23), "mod", "whole")
for two columns of data in row 23.
If VALUE1/VALUE2 is greae than the integer portion of VALUE1/VALUE2, then there is a remainder ("mod" result). If not, there isn't ("whole" result).
Hope this help.
Craig
-
Sorry, just occurred to me that if either VALUE1 or VALUE2 are negative, this won't work. Let me know if that data input is valid and I'll make the formula more Craig-proof.
Craig
-
Thanks J. Craig. I actucally came up with a similair solution yesterday that worked.
I needed a formula to find the majority. A majority is more than one. Example: 35/2=17.5 and a majority is 18. 34/2=17 and a majority is also 18. So, if it's a decimal it needs to round up. If it's whole it needs to add 1.
=IF(AND([VALUE]54 / 2 > INT([VALUE]54 / 2), [VALUE]54 / 2 < INT([VALUE]54 / 2) + 1), INT([VALUE]54 / 2) + 1, [VALUE]54 / 2 + 1)
If the quotient (VALUE/2) is greater than the interger of the quotient; AND less than interger of the quotient plus 1; then return the interger of the quotient plus 1; else return the quotent plus 1.
-
So you are always dividing by 2?
And looking for the majority?
How about
=(Int([Value]23/2)+1)
for row 23.
For both 35 and 34, the integer value is 17. +1 is 18.
Craig
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 416 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives