'How to find the sum given n, 1st score and last score?

Lets say you have a column called "values" and "no.of times". You have thousands of rows but you don't want to scrape the data from the site.. You have to calculate the sum of value column all u have is N = Total no.of persons (total Rows = last row value), 1st row value and last row value. How would you make a framework where you will get an approximate sum of values with these parameters given? You can use excel and some stats knowledge?

Rank. Score No.of times 
1        2000 4
2.       4000 6 
3        8000 7 

N = 3 
1st rank score = 2000 
Last rank score = 8000
Total = 8000+4000+2000=14000

Since it's for 3 rows it was easier to calculate but what if you have 1million rows and you don't have the data in an excel sheet or anywhere else. I just want a framework where I can arrive near around 14000 by just knowing N, 1st rank score and last rank score.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source