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
109 docs

Top Courses for Interview Preparation

Explore Courses for Interview Preparation exam

Top Courses for Interview Preparation

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

ppt

,

Important questions

,

Semester Notes

,

study material

,

MCQs

,

Free

,

Viva Questions

,

practice quizzes

,

shortcuts and tricks

,

pdf

,

past year papers

,

mock tests for examination

,

video lectures

,

Objective type Questions

,

Exam

,

Previous Year Questions with Solutions

,

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

,

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

,

Summary

,

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

,

Extra Questions

,

Sample Paper

;