Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default sorting w/ errors

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default sorting w/ errors

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


--
Regards,
Tom Ogilvy


" wrote:

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default sorting w/ errors

thank you!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting Values Without Sorting Formulas SBX Excel Discussion (Misc queries) 2 April 12th 09 11:17 PM
Automatic sorting (giving max and min) based on custom sorting lis Joe Lewis[_2_] Excel Worksheet Functions 4 November 23rd 08 05:12 AM
Excel Throwing Circular Errors When No Errors Exist MDW Excel Worksheet Functions 1 August 10th 06 02:15 PM
why does sorting large columns create errors in top selection? Mitch Excel Worksheet Functions 1 November 17th 05 08:19 PM
Unresolved Errors in IF Statements - Errors do not show in results Markthepain Excel Worksheet Functions 2 December 3rd 04 08:49 AM


All times are GMT +1. The time now is 05:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"