Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Count Whole / Integer Only?

How
do I
Count a Range
of whole-numbers / integers only?


  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Count Whole / Integer Only?

  1. Select the cell where you want to display the result of the count.
  2. Type the formula "=COUNTIF(range,"=int(range))" into the formula bar. Replace "range" with the actual range of cells that you want to count.
  3. Press Enter to apply the formula.

For example, if you want to count the number of whole numbers in the range A1:A10, you would type "=COUNTIF(A1:A10,"=int(A1:A10))" into the formula bar and press Enter.

This formula works by using the INT function to round each number in the range down to the nearest integer. The COUNTIF function then counts the number of cells in the range that match the rounded-down value. This will give you the count of whole numbers or integers only in the range.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 896
Default Count Whole / Integer Only?

provided there are no empty cells in A1:A10 try:

=SUM(IF($A$1:$A$10=INT($A$1:$A$10),1,))

this is an array formula so insert it with CTRL+SHIFT+ENTER
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Count Whole / Integer Only?

To count how many values in a range are integers
=SUMPRODUCT(--(B21:B25=INT(B21:B25)))
which is not an array formula
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"1.4 1.6 2.7 3.1" <1.4 1.6 2.7 wrote in
message ...
How
do I
Count a Range
of whole-numbers / integers only?




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
non-integer scrollbar Brad Charts and Charting in Excel 3 November 7th 07 03:27 AM
integer integer format Excel Worksheet Functions 1 May 3rd 07 06:45 PM
help with rounding up to whole integer kjcramp Excel Discussion (Misc queries) 3 April 10th 06 07:00 PM
how do I test for Integer? Stephen P Thomas Excel Worksheet Functions 4 July 13th 05 10:30 AM
positive integer? JZip Excel Discussion (Misc queries) 2 January 7th 05 06:37 PM


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