Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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?

  #2   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default 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?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default 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?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
change 2000 cells (negative numbers) into positive numbers lisbern Excel Worksheet Functions 2 August 16th 06 05:54 PM
Excel Formula - Add column of numbers but ignore negative numbers view for Distribution List members Excel Worksheet Functions 1 April 7th 06 03:13 AM
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Excel Worksheet Functions 3 January 19th 06 09:52 AM
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? C-Man23 Excel Worksheet Functions 1 January 9th 06 01:23 PM
Count comma separated numbers, numbers in a range with dash, not t Mahendra Excel Discussion (Misc queries) 0 August 8th 05 05:56 PM


All times are GMT +1. The time now is 11:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"