Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
number
i want to check to see if a cell or a number of cells
contain a number or a string. can anyone help me with that? thanx a lot |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
number
You can use the IsNumeric function to determine if the
expression in the cell can be evaluated to a number, and the For..Next construction to loop through all cells in the selected range. For example, the following counts the number of numeric cells in the range and displays a message box with the result: Sub CountNumeric() Dim Cell As Range Dim intCount As Integer intCount = 0 For Each Cell In Selection If IsNumeric(Cell) Then intCount = intCount + 1 End If Next MsgBox "There are " & intCount & " numeric cells in the selected range." End Sub HTH Kevin Sprinkel -----Original Message----- i want to check to see if a cell or a number of cells contain a number or a string. can anyone help me with that? thanx a lot . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sumif number is greater than a number but less than another number | Excel Discussion (Misc queries) | |||
How can I click on a telephone number in an Excel 2002 spreadsheet, and have the number dialed? | Excel Discussion (Misc queries) | |||
How to calculate number of occurencies of a specific number number | Excel Discussion (Misc queries) | |||
Formula to change scientific number to regular number or text | Excel Discussion (Misc queries) | |||
Rounding a number to a multiple quantity that adds to a fixed total number | Excel Worksheet Functions |