![]() |
Whole numbers and remainders
I want to use the result of dividing two numbers in Excel to do other
operations in an 'If Then' statement. If the number is a whole number, do one thing otherwise something else. In other words if the remainder is zero do this, otherwise this. How can I do that? Is an 'If Then' statement the right approach? |
Whole numbers and remainders
=if(mod(XXX/YYY,1)=0, do if integer, do if not)
" wrote: I want to use the result of dividing two numbers in Excel to do other operations in an 'If Then' statement. If the number is a whole number, do one thing otherwise something else. In other words if the remainder is zero do this, otherwise this. How can I do that? Is an 'If Then' statement the right approach? |
Whole numbers and remainders
Hi,
Try this: =IF(A2=0,0,A1/A2) Thanks, -- Farhad Hodjat " wrote: I want to use the result of dividing two numbers in Excel to do other operations in an 'If Then' statement. If the number is a whole number, do one thing otherwise something else. In other words if the remainder is zero do this, otherwise this. How can I do that? Is an 'If Then' statement the right approach? |
All times are GMT +1. The time now is 10:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com