Can you explain exactly what you want a revised formula to do. Your sample file should include some REPRESENTATIVE samples, along with manually calculated results. In your current sheet, I see a pile of 1s, little explanation and no indication of your expected (manually calculated) results.