![]() |
#7
|
||||
|
||||
![]()
Hi,
Quote:
First of all, we need a way to check if the number is a whole number. Excel doesn't have a built-in which will do that. However, it does have a few functions which can be used to remove the decimal portion of a number: the most common would be INT() and TRUNC(), but there are also various rounding functions too (such as ROUND(), ROUNDDOWN(), etc....). The logic I used was to take the number from each cell, remove the decimal portion of the number and then check to see if that is equal to the original number: if it is then the number must be a whole number: Code:
=IF(TRUNC(A1)=A1,"A1 is a whole number","A1 is not a whole number") From there, it's just a case of applying the correct logic for the possible outcomes:
Code:
=IF(TRUNC(A1)=A1,IF(TRUNC(B1)=B1,MIN(A1,B1),A1),B1) |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to solve this formula in excel | BrOkEn_iCe | Excel | 2 | 12-21-2010 05:45 AM |
excel help Formula | sellspeed | Excel | 15 | 03-10-2010 10:57 AM |
Needs help to find excel formula- Please | aamer_1983 | Excel | 2 | 07-13-2009 01:46 AM |
Excel Formula Help | masoom84 | Excel | 1 | 03-07-2009 09:41 AM |
![]() |
Shahzad | Excel | 1 | 12-07-2008 04:13 AM |