sorting w/ errors

  • Thread starter Thread starter cmtinker
  • Start date Start date
C

cmtinker

I'm trying to sort a column that contains a formula and some of the
values contain an error. Of course, when I sort descending (which is
what I need) I get the error values first and then the data that I
need under it. I need to check to find the first value in the column
that isn't an error value but can't figure out how to evaluate if a
cell actually has an error in it

I've tried

While Sheet1.Cells(sheet1row, 21).Value <> ""

While Sheet1.Cells(sheet1row, 21).Value = xlErrNA

and in all cases incrementing sheet1row but always receive a mismatch
error

I also tried sorting ascending and trying this check

While Sheet1.Cells(sheet1row + 1, 21).Value >= Sheet1.Cells(sheet1row,
21).Value And Sheet1.Cells(sheet1row + 1, 21).Value <> xlErrNA

but that didn't work either

does anyone have any ideas? I'd greatly appreciate it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top