#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default if statement

is there a way to formulate the following.
IF A2 = whole number then enter 0 if A2 contains a decimal than enter
content of B4.

whole number = any number without a decimal ie 1, 4 ,6 ,10, 15, ect

Decimal = any number with decimal ie 1.11, 4.32, 5.5, 10.6, 33.33, ect


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default if statement

On Thu, 30 Jul 2009 12:14:01 -0700, ironworker
wrote:

is there a way to formulate the following.
IF A2 = whole number then enter 0 if A2 contains a decimal than enter
content of B4.

whole number = any number without a decimal ie 1, 4 ,6 ,10, 15, ect

Decimal = any number with decimal ie 1.11, 4.32, 5.5, 10.6, 33.33, ect



Try this formula:

=IF(A2=INT(A2),0,B4)

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default if statement

=IF(MOD(A2,1)=0,0,B4)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"ironworker" wrote in message
...
is there a way to formulate the following.
IF A2 = whole number then enter 0 if A2 contains a decimal than enter
content of B4.

whole number = any number without a decimal ie 1, 4 ,6 ,10, 15, ect

Decimal = any number with decimal ie 1.11, 4.32, 5.5, 10.6, 33.33, ect



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default if statement

thank you I was able to uses nieks for my situation

"Niek Otten" wrote:

=IF(MOD(A2,1)=0,0,B4)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"ironworker" wrote in message
...
is there a way to formulate the following.
IF A2 = whole number then enter 0 if A2 contains a decimal than enter
content of B4.

whole number = any number without a decimal ie 1, 4 ,6 ,10, 15, ect

Decimal = any number with decimal ie 1.11, 4.32, 5.5, 10.6, 33.33, ect




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
Embedding an OR statement in an IF statement efficiently Chatnoir11 Excel Discussion (Misc queries) 4 February 2nd 09 08:12 PM
SUMIF statement with AND statement Eric D Excel Discussion (Misc queries) 2 July 14th 08 07:24 PM
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


All times are GMT +1. The time now is 09:10 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"