Interview Preparation Exam  >  Interview Preparation Notes  >  Puzzles for Interview  >  Find missing Row in Excel

Find missing Row in Excel | Puzzles for Interview - Interview Preparation PDF Download

Introduction

In this puzzle, we are given an Excel sheet that contains integers from 1 to 50 (including both), but the numbers are in a jumbled order, and one integer is missing. The challenge is to write a code to identify the missing integer by using logic.

Solution 

Using the Sum Formula
The solution to this puzzle is simple when we use the sum formula. 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 (where n = 50)
= 50*(51)/2
= 25*51
= 1275
Subtracting the Present Sum from the Total Sum
Now, we need 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. This is because, if no integer was missing, the sum of all the integers present in the file would be equal to the sum of all the integers from 1 to 50.

Conclusion

In conclusion, we can find the missing integer in an Excel sheet in a jumbled form by using the sum formula. We just need to sum all the integers present in the file and subtract the sum from the total sum of all the integers from 1 to 50. The difference between these two sums would give us the missing integer.

The document Find missing Row in Excel | Puzzles for Interview - Interview Preparation is a part of the Interview Preparation Course Puzzles for Interview.
All you need of Interview Preparation at this link: Interview Preparation
Are you preparing for Interview Preparation Exam? Then you should check out the best video lectures, notes, free mock test series, crash course and much more provided by EduRev. You also get your detailed analysis and report cards along with 24x7 doubt solving for you to excel in Interview Preparation exam. So join EduRev now and revolutionise the way you learn!
Sign up for Free Download App for Free
109 docs

Up next

Up next

Explore Courses for Interview Preparation exam
Related Searches

Find missing Row in Excel | Puzzles for Interview - Interview Preparation

,

study material

,

shortcuts and tricks

,

ppt

,

Summary

,

Previous Year Questions with Solutions

,

video lectures

,

MCQs

,

Extra Questions

,

Exam

,

mock tests for examination

,

Sample Paper

,

Find missing Row in Excel | Puzzles for Interview - Interview Preparation

,

Find missing Row in Excel | Puzzles for Interview - Interview Preparation

,

Objective type Questions

,

past year papers

,

Free

,

Important questions

,

Semester Notes

,

pdf

,

Viva Questions

,

practice quizzes

;