HomeInterview QuestionsHow can I calculate the total for Science and for …

How can I calculate the total for Science and for another subject using Excel?

🟢 Easy Other Fresher level
1Times asked
Jul 2026Last seen
Jul 2026First seen

💡 Model Answer

In Excel, you can use the SUMIF or SUMIFS function to total values that meet a criterion. Suppose column A contains subjects and column B contains marks. To get the total for Science:

=SUMIF(A:A, "Science", B:B)

To get the total for Maths:

=SUMIF(A:A, "Maths", B:B)

If you need to sum multiple subjects at once, use SUMIFS with multiple criteria or combine SUMIFs:

=SUMIF(A:A, "Science", B:B) + SUMIF(A:A, "Maths", B:B)

These formulas scan the range once, so the time complexity is linear in the number of rows. They are easy to maintain and work well for dynamic data ranges.

This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.

🎤 Get questions like this answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.

Get Assisting AI — Starts at ₹500