tags:

views:

21

answers:

1

I know there is a way to get the Error cells in VBA as below

Set rng = xlBook1.Sheets(s1).UsedRange.SpecialCells(xlCellTypeFormulas, xlErrors)

can any one provide me the way to do this in csharp. basically to get all the cells that is having errors in the formula like (#DIV/0!, #REF!) in a range

A: 

I got it...

rngTemp = (Excel.Range)wsCTAWK13.UsedRange.SpecialCells(Excel.XlCellType.xlCellTypeFormulas, Excel.XlSpecialCellsValue.xlErrors);

Sathish