ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   HOW DO I SELECT ROUND NUMBERS ONLY IN EXCEL SPREADSHEET (https://www.excelbanter.com/excel-worksheet-functions/45670-how-do-i-select-round-numbers-only-excel-spreadsheet.html)

Jez

HOW DO I SELECT ROUND NUMBERS ONLY IN EXCEL SPREADSHEET
 
I want to write a formula where if a cell contains a whole number a certain
value will be returned (true) but if its not a whole number (false) another
value will be returned. Thanks for any help

Roger Govier

Hi

One way
=IF(INT(A1)=A1,1,2)
Replace 1 and 2 with your values or cell references.

Regards

Roger Govier


Jez wrote:
I want to write a formula where if a cell contains a whole number a certain
value will be returned (true) but if its not a whole number (false) another
value will be returned. Thanks for any help


Jez

Hi, Thanks very much for that - fantastic

"Roger Govier" wrote:

Hi

One way
=IF(INT(A1)=A1,1,2)
Replace 1 and 2 with your values or cell references.

Regards

Roger Govier


Jez wrote:
I want to write a formula where if a cell contains a whole number a certain
value will be returned (true) but if its not a whole number (false) another
value will be returned. Thanks for any help




All times are GMT +1. The time now is 07:04 PM.

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