View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default nested "IF" function in Excel 2007

Try this:

=IF(COUNT(A1:A5)=0,"no
data",AVERAGE(IF(COUNT(A1:A5)=5,LARGE(A1:A5,{1,2,3 ,4}),A1:A5)))

--
Biff
Microsoft Excel MVP


<dale hollingsworth wrote in message
...
How would I write a function that will count the number of tests taken and
if it is 5 subtract the lowest score and then average the remaining 4? If
only 4 tests then the lowest is not subtracted.

Thanks