ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Check if content in cell is an integer (https://www.excelbanter.com/new-users-excel/185817-re-check-if-content-cell-integer.html)

Mike H

Check if content in cell is an integer
 
Try this

=IF(MOD(A2,4)=0,"Integer","No an integer")

Mike

"prem" wrote:

How do I check if the content in a cell, when divided by 4, returns an
integer? It should give me 150 if it is an integer and display "NA" if it is
not an integer.

For example, the formula should check if the content A2 divided by 4 is an
integer and display the necessary answer in cell C2.

Hopefully the formula can be use to check any corresponding cell in this
manner. I.E check if content in cell A3 when divided by 4 is an integer and
display the necessary in cell C3, check if content in cell A4 when divided
by 4 is an integer and diaplay the necessary in cell C4 and so on.

Thank you for your help.



All times are GMT +1. The time now is 10:09 PM.

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