ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   identifying errors (https://www.excelbanter.com/excel-programming/347241-identifying-errors.html)

dstiefe

identifying errors
 
I am looping through a column and if the cells contain either of the following:

"#value!"
"#DIV/0!"
"#REF!"

how do i do that?

chijanzen

identifying errors
 
dstiefe:

if your data in range("A1:A6")

try,

Dim rng As Range
For Each rng In Range("A1:A6")
If Not IsError(rng) Then
MsgBox rng.Value
Else
MsgBox "Is Error Range" & rng.Text
End If
Next rng

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"dstiefe" wrote:

I am looping through a column and if the cells contain either of the following:

"#value!"
"#DIV/0!"
"#REF!"

how do i do that?



All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com