Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Ignoring #N/A in sorting?

I have a multipage workbook in which I need to average the 15 highest values
in the last column for each sheet. Not all the cells in this column-which
contain the results of a calculation in two other columns--are filled in. I
recorded a macro that sorts the sheet and then averages the figures in the
top 15 cells of the last column. Problem arises for any sheet in which all
the cells in that last column aren't filled in. Excel sorts and then puts
all the #N/A cells at the top. How do I get the macro to ignore any cells
that don't contain values?



Thanks for any leads on this.



Arsenio


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Ignoring #N/A in sorting?

I don't think you can have excel ignore anything in the range to be sorted.

But maybe you could modify your formula to return something besides #n/a -- or
even insert a new column that you can use to return what you want if there's an
error in that cell.

=if(iserror(x2),99999999,x2)
copy down the column
and sort your data based on this column.

Arsenio Oloroso wrote:

I have a multipage workbook in which I need to average the 15 highest values
in the last column for each sheet. Not all the cells in this column-which
contain the results of a calculation in two other columns--are filled in. I
recorded a macro that sorts the sheet and then averages the figures in the
top 15 cells of the last column. Problem arises for any sheet in which all
the cells in that last column aren't filled in. Excel sorts and then puts
all the #N/A cells at the top. How do I get the macro to ignore any cells
that don't contain values?

Thanks for any leads on this.

Arsenio


--

Dave Peterson
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
Maintaining cell reference after sorting GRITS Excel Discussion (Misc queries) 2 April 30th 23 07:42 PM
Sorting Sorting Sorting Skydiver Excel Discussion (Misc queries) 4 June 3rd 06 02:42 PM
Sorting Data in ascending order sharon2006 Excel Discussion (Misc queries) 1 March 14th 06 01:07 AM
Ignoring characters when sorting amy153 Excel Discussion (Misc queries) 0 February 14th 06 09:20 PM
Adding a KeyID column for sorting Rebecca New Users to Excel 3 February 20th 05 07:09 PM


All times are GMT +1. The time now is 07:24 PM.

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

About Us

"It's about Microsoft Excel"