Prev Previous Post   Next Post Next
  #2   Report Post  
schuurke28
 
Posts: n/a
Default


something like this?


Sub testje()
Dim i As Long, value As Variant, decimals As Long, wholenumbers As
Integer
For i = 1 To ActiveSheet.UsedRange.Rows.Count
value = Cells(i, 1).value
If IsNumeric(value) And Not IsEmpty(value) Then
'point or comma for numbers are depending of pc
settings
If InStr(1, value, ",") + InStr(1, value, ",") 0
Then
decimals = decimals + 1
Else
wholenumbers = wholenumbers + 1
End If
End If
Next i

MsgBox "# decimals : " & decimals & vbCrLf & "# wholenumbers : " &
wholenumbers

End Sub


--
schuurke28
------------------------------------------------------------------------
schuurke28's Profile: http://www.excelforum.com/member.php...o&userid=15818
View this thread: http://www.excelforum.com/showthread...hreadid=273137

 
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
Counting Rainfall Data TightIsobars Excel Discussion (Misc queries) 2 January 17th 05 11:45 PM
counting instances of words in a worksheet cell CJ Excel Discussion (Misc queries) 2 December 22nd 04 02:49 AM
Counting With Blank Rows SMDIYDLI Excel Discussion (Misc queries) 4 December 21st 04 09:00 AM
counting non occur entries excelFan Excel Discussion (Misc queries) 2 December 15th 04 07:15 PM
Counting instances in a cell [email protected] Excel Discussion (Misc queries) 2 December 11th 04 03:14 PM


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