ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Operator for Contains (https://www.excelbanter.com/excel-worksheet-functions/207181-operator-contains.html)

Leanne M (Aussie)

Operator for Contains
 
Hi,

I want to do a standard IF function - with a twist.

Basically I want to look at a cell and if it is not a whole number then I
want a certain action and if it is then another action.

I thought I could do this with an IF contains . but this does not seem to
work.

Could anyone please provide some help on this topic.

Thanks
--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)

Stefi

Operator for Contains
 
Try this:
=IF(MOD(A1,1)=0,"integer","non-integer")

Regards,
Stefi

€˛Leanne M (Aussie)€¯ ezt Ć*rta:

Hi,

I want to do a standard IF function - with a twist.

Basically I want to look at a cell and if it is not a whole number then I
want a certain action and if it is then another action.

I thought I could do this with an IF contains . but this does not seem to
work.

Could anyone please provide some help on this topic.

Thanks
--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)


Alan Moseley

Operator for Contains
 
Lets assume that the cell you are checking the number in is in A1. Your
formula should be something like:-

=IF(A1=INT(A1),"Whole Number","Decimal Number")

--
Alan Moseley IT Consultancy
http://www.amitc.co.uk


"Leanne M (Aussie)" wrote:

Hi,

I want to do a standard IF function - with a twist.

Basically I want to look at a cell and if it is not a whole number then I
want a certain action and if it is then another action.

I thought I could do this with an IF contains . but this does not seem to
work.

Could anyone please provide some help on this topic.

Thanks
--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)



All times are GMT +1. The time now is 01:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com