VOOZH about

URL: https://www.geeksforgeeks.org/aptitude/puzzle-40-find-missing-row-in-excel/

⇱ Puzzle | Find missing Row in Excel - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Puzzle | Find missing Row in Excel

Last Updated : 27 Apr, 2026

We are given an excel sheet that contains integers from 1 to 50, including both. However, the numbers are in a jumbled form, and there is 1 integer missing. You have to write a code to identify the missing integer. Only the logic is required.  

👁 image

Check if you were right - full answer with solution below.    

Solution:

We know that the sum of all the numbers from 1 to n is n*(n+1)/2. Therefore, the sum of all the numbers from 1 to 50 is

50*(50+1)/2 
= 50*(51)/2
= 25*51
= 1275.

Therefore, all we need to do is to sum all the integers present in the file and subtract the sum from 1275. The difference between 1275 and this sum would give us the missing integer.

Comment
Article Tags: