Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there.
I want to check if a cell's value is "#VALUE!". How can I do this? If Cells(1, 1).Value = "#VALUE!" Then ... ... doesnt work. Thanks -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can do it this way:
If ActiveCell.Value = CVErr(xlErrValue) Then MsgBox "value error" End If more general is: If IsError(ActiveCell.Value) Then MsgBox "the cell contains an error value" End If Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "fabalicious " wrote in message ... Hi there. I want to check if a cell's value is "#VALUE!". How can I do this? If Cells(1, 1).Value = "#VALUE!" Then .. .. doesnt work. Thanks F --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use a combination of IsError and CVErr, something like:
Code ------------------- If IsError(Cells(1, 1).Value) Then If Cells(1,1).Value = CVErr(xlErrValue) Then MsgBox "#Value Error in Cell" Else MsgBox "Other Error in Cell" End If Else MsgBox "No Error in Cell" End If ------------------- Check the help files for more information. T -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
when a "check box" is checked, a "result" to be shown in another c | Excel Discussion (Misc queries) | |||
Check if cells contain the word "Thailand", return "TRUE" | Excel Worksheet Functions | |||
How can I check the "P" or "A" in the attendance sheet | Excel Worksheet Functions | |||
create links to check boxes marked "good" fair"and "bad" | Excel Worksheet Functions |