![]() |
Excel VBA If statement question
I am trying to write an IF statement that will take another cell and
tell me if that cell is a whole number or not. The statemnet I currently have that does not work is : =IF(M4 = "*.*","1","0") where M4 is a cell with a value (in my case 0.04). I am not sure if the "*.*" is the correct syntax or not to find out if the number is whole or not. Any insight would be appreciated. Drew |
Excel VBA If statement question
Try:
=If(mod(m4,1)=0,"True","False") HTH " wrote: I am trying to write an IF statement that will take another cell and tell me if that cell is a whole number or not. The statemnet I currently have that does not work is : =IF(M4 = "*.*","1","0") where M4 is a cell with a value (in my case 0.04). I am not sure if the "*.*" is the correct syntax or not to find out if the number is whole or not. Any insight would be appreciated. Drew |
Excel VBA If statement question
Drew,
I wasn't sure which result "1" would indicate: =IF(INT(M4)=M4,"whole","fraction") hth, Doug wrote in message ups.com... I am trying to write an IF statement that will take another cell and tell me if that cell is a whole number or not. The statemnet I currently have that does not work is : =IF(M4 = "*.*","1","0") where M4 is a cell with a value (in my case 0.04). I am not sure if the "*.*" is the correct syntax or not to find out if the number is whole or not. Any insight would be appreciated. Drew |
All times are GMT +1. The time now is 01:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com