Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, without going cell-by-cell, is there any quick way to validate a range of
cells (e.g. A1:B10) to be numeric and returns the error cell address if not numeric? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What's wrong with going cell-by-cell ?
Tim "aushknotes" wrote in message ... Hi, without going cell-by-cell, is there any quick way to validate a range of cells (e.g. A1:B10) to be numeric and returns the error cell address if not numeric? Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As long as the code will not be used in anyway as part of a User Defined
Function, the you can use code constructed like this... Dim R As Range, TextAddress As String ..... ..... Set R = Range("A1:H14") On Error Resume Next TextAddress = R.SpecialCells(xlCellTypeConstants, xlTextValues).Address If Len(TextAddress) = 0 Then MsgBox "All cells in range are either numbers or blanks" Else MsgBox "Cell " & TextAddress & " is not a number" End If -- Rick (MVP - Excel) "aushknotes" wrote in message ... Hi, without going cell-by-cell, is there any quick way to validate a range of cells (e.g. A1:B10) to be numeric and returns the error cell address if not numeric? Thanks. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perfect & very neat! Thanks a million!
"Rick Rothstein" wrote: As long as the code will not be used in anyway as part of a User Defined Function, the you can use code constructed like this... Dim R As Range, TextAddress As String ..... ..... Set R = Range("A1:H14") On Error Resume Next TextAddress = R.SpecialCells(xlCellTypeConstants, xlTextValues).Address If Len(TextAddress) = 0 Then MsgBox "All cells in range are either numbers or blanks" Else MsgBox "Cell " & TextAddress & " is not a number" End If -- Rick (MVP - Excel) "aushknotes" wrote in message ... Hi, without going cell-by-cell, is there any quick way to validate a range of cells (e.g. A1:B10) to be numeric and returns the error cell address if not numeric? Thanks. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Validating cells | Excel Discussion (Misc queries) | |||
Validating range names | Excel Programming | |||
Validating Cells | Excel Programming | |||
Validating non-blank cells in workbook | Excel Worksheet Functions | |||
Validating cells | Excel Discussion (Misc queries) |