View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Shannon diversity index formula

Try this then:

=-SUMPRODUCT((C$2:C$20/SUM(C$2:C$20)),(IF(C$2:C$200,(LOG(C$2:C$20/SUM(C$2:C$20))))))
Activate with CTRL SHIFT ENTER
You should see {} around the formula when you are done.

"peter" wrote:

This function still evaluates to a #NUM error.

On Apr 8, 2:22 pm, Barb Reinhardt
wrote:
Try this

=-SUMPRODUCT(--(C2:C200),(C2:C20/SUM(C2:C20)),(LOG(C2:C20/SUM(C2:C20))))



 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.