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

109 docs
Download as PDF
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

pdf

,

Extra Questions

,

Important questions

,

Sample Paper

,

ppt

,

Viva Questions

,

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

,

Exam

,

study material

,

Previous Year Questions with Solutions

,

Summary

,

MCQs

,

practice quizzes

,

Objective type Questions

,

video lectures

,

Semester Notes

,

mock tests for examination

,

Free

,

past year papers

,

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

,

shortcuts and tricks

,

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

;