I'm rather confused. Another user Ron just say the opposite. Suppose stock prices in an array (or table or database) and annual earnings of 10 years in another array (or table or database) to compute PE using average of last 3 years is like writing a program Can spreadsheet really do the job?