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
Related Searches

Sample Paper

,

shortcuts and tricks

,

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

,

Viva Questions

,

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

,

Free

,

ppt

,

Semester Notes

,

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

,

Important questions

,

pdf

,

MCQs

,

mock tests for examination

,

Extra Questions

,

Previous Year Questions with Solutions

,

video lectures

,

practice quizzes

,

Exam

,

Objective type Questions

,

study material

,

Summary

,

past year papers

;