17. Interview Questions and Answers
17.2 Functions and Formulas
Practise Q9 through Q20 with a calculation you can trace. Use the course order records for sums, conditions and weights, then test days, growth and running totals on a short period sheet.
Q9. Explain which amounts SUMIF and SUMIFS keep
Use a known excluded order as evidence
In a fictional Blinkit and Amazon Now training exercise the operations lead asks for delivered order amount in Pune. An earlier report lists all Pune order amounts. SUMIF applies one criterion and takes its criterion range first. SUMIFS accepts multiple criterion range and criterion pairs and starts with the amount range. The feature difference matters because including Cancelled would answer a different question. Start with the rule and known keys, then choose the function.
Preserve the row alignment when writing from memory
In the original data, C is City, G is Amount, and I is Status. Place the two formulas on the same sheet outside the source. Each one examines matching rows across the ranges. Row two refers to one source order across all selected columns, then row three does the same. Shift the amount range to G3:G12 and its height stays ten while the positions no longer agree with the city and status. Excel cannot infer the correct order ID from the value it was asked to add. Check both the starting and ending rows.
=SUMIF(C2:C11,"Pune",G2:G11)
=SUMIFS(G2:G11,C2:C11,"Pune",I2:I11,"Delivered")
The first gives 544 because Pune includes 64, 110, 150 and 220. The second gives 324 because BLK-1009 is Cancelled and the 220 is excluded. A SUMIFS with one pair can also express the first calculation. If a candidate retains SUMIF with a single criterion, they should explain its argument order and check the implementation independently. If a question says Pune or Nashik, putting each city into a separate required SUMIFS condition on the same field asks for an impossible simultaneous city match. Add disjoint groups separately or choose an explicit alternative condition.
Q10 and Q11. Prove the decision and the weighting
Use the right logical test and test its boundary
IF selects one result for a true test and another for a false test. AND needs every input condition to be true; OR needs at least one to be true. A fictional high-value order label in this workbook needs numeric Amount at least 500 and status Delivered. The status rule prevents a high recorded cancelled amount from entering the label. Use an amount exactly at 500 to check that the boundary qualifies. An output of empty text is visually blank in many formats but it still comes from a formula.
=IF(AND(G2>=500,I2="Delivered"),"Big order","")
=IFS(G2>=500,"High",G2>=100,"Medium",TRUE,"Low")
For the second formula, IFS returns the outcome for the first true condition. An amount of 500 also passes the lower test. If you list the amount at least 100 branch first, it would reach Medium before the high branch. Use an explicit last TRUE when that baseline policy accepts any remaining valid number as Low. In a live model validate numeric amounts first. Otherwise a cell whose stored value is text can pass comparisons in surprising ways. Use the original data or a controlled test with valid typed numbers.
SWITCH is a useful option for matching an input against named categories such as Delivered, Cancelled and Returned. Supply a meaningful default for unexpected status values when the application requires it. A sequence of threshold comparisons is more directly expressed with ordered conditions. Keep the test rule in plain words so a reviewer can check whether the labels overlap or leave a gap.
Explain the numerator and denominator before using SUMPRODUCT
SUMPRODUCT multiplies pairs at the same positions and adds the products. In this training question, we want elapsed delivery minutes weighted by ordered item quantity. A row with five items then has five times the influence of a quantity-one row. The result is a quantity-weighted average time attached to order rows. A different business question, average elapsed time per delivery order, would count each order once. Describe which rows belong in each measure. The base arithmetic demonstration includes every source record. A realistic fulfilled-delivery measure ordinarily applies the agreed Delivered status restriction to both numerator and denominator.
=SUMPRODUCT(H2:H11,F2:F11)/SUM(F2:F11)
=SUMPRODUCT((I2:I11="Delivered")*H2:H11*F2:F11)/SUMIF(I2:I11,"Delivered",F2:F11)
Read one product manually. BLK-1001 has two items and nine minutes, contributing 18 to the numerator and two to the weight. BLK-1006 has five items and eight minutes, contributing 40 and five. On the ten original rows the weighted numerator is 285 and the weight is 24, giving 11.875 minutes. On the seven delivered rows the numerator is 207 and weight 17, giving about 12.17647 minutes. The exclusion changes both numbers. Using 207 over 24 would silently combine incompatible source scopes. Use bounded same-sized arrays and check that numeric values and weights follow the input policy.
Lab one. Rebuild the known outputs and change one status
- Use a disposable copy of the ten original order rows in A1:I11. Confirm the field letters, especially F for Qty, G for Amount, H for Mins and I for Status. Keep the date, order ID and all other original fields. Amount, quantity and minutes should be genuine numbers.
- Enter the SUMIF and SUMIFS into spare result cells. Check Pune recorded 544 and Pune delivered 324. Reconcile the known IDs from the image by filtering or checking each source row. Restore the source filter view before the next task.
- In J2, place the first IF formula and fill to J11. BLK-1007 at row eight is the sole Big order in the baseline. To test the boundary, use a working copy and change BLK-1001's amount to exactly 500. It now returns Big order. Change its status to Cancelled while retaining 500 and it no longer qualifies. Restore both fields.
- Enter the two weighted calculations. Check the products or compute a separate helper column of F times H. Sum its all-row values and filter or condition against Delivered for the second numerator. Check both denominators independently. Record 11.875 and approximately 12.17647, then apply any rounding only for the required display.
- Change original BLK-1009 to Delivered in a reset copy and leave 220, quantity two and minutes 13 intact. Pune Delivered adds 220 and becomes 544. The delivered weighted numerator becomes 233 and its weight becomes 19, giving approximately 12.26316. The all-row weighted calculation remains 11.875. Restore the original status and discard the altered copy after the check.
Trace one amount and one weight through the status change
Identify BLK-1009
Its Amount is 220, Qty is two, Mins is 13, and its original status is Cancelled.
Apply the original rule
It counts toward recorded Pune amounts but fails the separate Delivered conditions.
Change only status
Delivered sums gain 220 in Pune and the delivered weighted numerator gains 26 while its denominator gains two.
Verify the unchanged measure
All-row minutes weighted by quantity remain 285 divided by 24. The status change moved scope without changing the source values.
If the sums disagree with these values, compare the four Pune IDs and each exact amount to the source. A duplicated key can inflate both the controlled totals and the review. A shifted range can preserve total height and still select wrong values. If a weighted calculation fails, inspect the input type and the denominator, especially after filtering down to a group with no positive quantity. Use typed zeros and a deliberate no-data policy. A blank or zero denominator should yield a documented review outcome rather than a guessed average.
Q12 and Q13. Treat a useful error as evidence
Handle an expected missing match while preserving structural failures
IFNA substitutes a chosen value only when its input resolves to #N/A. IFERROR can substitute its value for supported error results more broadly. Given an exact lookup expecting some missing orders, IFNA lets you label the ordinary missing case while a broken reference stays visible. In a supported XLOOKUP formula the if_not_found argument describes a missing match directly. If a matched source cell already contains an error, inspect that source value rather than assuming the key did not exist. Check a valid key, a known missing key and a damaged reference as distinct tests.
=IFNA(NA(),"Review source key")
=IFNA(3/0,"Review source key")
=IFERROR(3/0,"Cannot calculate")
These teaching formulas show the distinctions independently of the order dataset. The first gives Review source key. The second returns #DIV/0!. The third gives Cannot calculate. A single generic replacement can make missing data, division by zero and broken source ranges all look the same. In a dashboard, choose specific messages and handle eligibility explicitly. Keep a place where the original failure can be investigated and label what action is needed before changing output cells.
- #N/A. A missing or unavailable result can occur when a required exact key has no match. Lookup is one common cause. Check the stored key and lookup domain.
- #DIV/0!. The denominator is zero or a referenced blank is taken as zero. Verify the denominator value and its business meaning.
- #VALUE!. The function can receive incompatible types or array shapes. SUMPRODUCT with unequal dimensions is an example. Inspect the input ranges before replacing it.
- #REF!. A reference can be invalid after deleting source cells or when a lookup column position cannot exist in its source range. Confirm the actual region, source and indexing method.
- #NAME?. Excel cannot recognise a function, name or expression token. Check spelling, quotes and version support.
- #NUM!. An argument can be outside a numeric operation's supported domain. A DATEDIF with the start after the end is one example.
- #SPILL!. A dynamic output cannot be placed as calculated. Check its location and any occupied result cells.
- #CALC!. A FILTER formula can produce this error when its result is empty and the third argument is omitted. Set a useful no-match result if an empty selection is ordinary.
When someone says "just remove the errors", ask how they would like to see each business case. It may make sense to show an explicit no-current-sales label for a confirmed zero count. Missing source input needs review. Replacing the latter with zero would make a questionable report look valid. Test that totals and charts can distinguish real zeros from labels or uncalculated results.
Q14 and Q15. Verify the cleaned string and keep the source
Read the visible output and the actual characters
In a fictional Swiggy-style partner export, a City value of " pune " has a normal space on each side and lowercase letters. TRIM removes the ordinary outer spaces and normalises runs of ordinary internal spaces. PROPER can make this practice value "Pune". A safe city dictionary can identify valid labels more reliably than capitalising words. Local abbreviations and verified proper spelling may require an explicit mapping. Keep the Raw City and Clean City fields distinct so groups with several spellings can be reconciled.
CLEAN handles particular nonprinting characters and TRIM handles ordinary spaces. They do not promise to remove every Unicode space or invisible character found in a web export. In those cases inspect the characters and use a targeted replacement for an identified problem. The general mistake is to apply a blanket cleanup to order keys and descriptions simply because both are text. Normalising display names is different from rewriting IDs that need exact characters.
Extract only a domain the exercise has defined
For the original short input zoya@example.com, FIND locates the at sign. MID keeps everything after that location, using LEN to allow the remaining text to extend to the end. TEXTAFTER can implement the same extraction on supported versions, including current Microsoft 365 and Excel 2024. Write down the exact output example.com. Define what an input with several at signs, an empty domain or whitespace means. A split operation alone does not validate a real email identity.
=MID(A2,FIND("@",A2)+1,LEN(A2))
=TEXTAFTER(A2,"@")
For a small training file of simplified addresses with exactly one separator, a useful negative test is "zoya.example.com" with no at sign. The legacy FIND-based formula reports #VALUE! because the delimiter cannot be found. TEXTAFTER's default missing delimiter result is #N/A. Where the chosen version supports it, use the appropriate missing-delimiter argument if the report needs a review message. Inputs with multiple at signs or trailing blank content need a separate rule and tests. Point out that the extracted string is a tentative domain label rather than proof of address deliverability.
Q16 through Q18. State the date interval and the comparison base
Choose a calendar meaning before calculating
For true Excel dates, subtract start date from end date for elapsed days. An interval from 1 August to 1 September 2026 is 31 elapsed days. If a manager asks for the number of publication dates counting both endpoints, that is a separate inclusive counting rule. Working days can use NETWORKDAYS for the usual Saturday and Sunday weekend and an explicit list of holiday dates where relevant. Document the chosen calendar. Complete calendar months and years are different from dividing elapsed days by 30 or 365. DATEDIF with m or y can serve tested anniversary cases. Microsoft documents limitations, particularly the MD argument, and a start after the end causes #NUM!.
Write a known date using DATE with year, month and day separately if a typed slash notation might be misunderstood. A displayed date is a number with a format and may also have a time fraction. A text string can look indistinguishable in the grid and still behave differently. Check a source date's type and a known timestamp before subtracting or grouping. If source rows span several years, a dashboard labelled August needs either a year dimension or an explicitly defined comparison period.
Define the percentage as change relative to an earlier value
The usual formula divides current minus previous by previous. Suppose the fictional practice report shows 200 in August and 250 in September. The difference is 50 and the relative growth is 25 percent. Reversing the periods gives a different relative measure because the denominator changes. If previous is zero, normal percentage growth is undefined; show the absolute change and your agreed label. If previous is missing, inspect the source rather than claiming it was zero. A previously negative measure may require a separate domain rule before reporting a percentage to management.
For a PivotTable percentage difference, verify the base field and comparison item after configuring the value display. The previous position in a sorted report may be separated by several months if a source month is missing. Check the labels and underlying data. A statement about month-over-month must name adjacent periods as defined by the report. A monthly total can still change because a new branch was included, so check comparable scope and dates.
Use an expanding range for an ordered cumulative total
A running total keeps all amounts from the start of the series through the current row. The fixed starting reference preserves the first amount. The end moves as you fill down. With periods in chronological order, this shows accumulation through each period. Sorting only the amounts would break their relationship to dates. Sorting all records into a new order changes the meaning of a position-based running total. If the cumulative figure is meant to reset each year, include a reset rule and verify the first month of the next year.
Lab two. Build the period sequence and isolate a zero base
On a scratch sheet place Period in A1 and Amount in B1. In A2 through A4 enter =DATE(2026,8,1), =DATE(2026,9,1) and =DATE(2026,10,1). Format as months for display and inspect the full original date before calculating. Enter 200, 250 and 0 in B2:B4. Use Day Gap for C1, Growth for D1 and Cumulative for E1. In C3 enter the first formula below, in D3 enter the second, and in E2 enter the third. Extend C3 and D3 to row four, and E2 to row four.
=A3-A2
=IF(COUNT(B2:B3)<2,"Review missing or invalid",IF(B2=0,"No percent base",(B3-B2)/B2))
=SUM($B$2:B2)
=DATEDIF(A2,A4,"m")
| Month | Amount | Day gap | Growth | Cumulative |
|---|---|---|---|---|
| Aug | 200 | — | — | 200 |
| Sep | 250 | 31 | 25% | 450 |
| Oct | 0 | 30 | −100% | 450 |
- Observe C3 and C4. A subtraction gives elapsed days even when the dates are presented only by month. If the result looks like a strange date, apply General or Number to the elapsed day result.
- Enter the last DATEDIF formula in a spare cell. Expect two complete calendar months from August 1 to October 1. This regular case has endpoints on the first day. Use the supported DATEDIF source and test month-end behavior separately if your report requires it.
- Check D4 at negative 100 percent. Previous 250 and observed current zero make a genuine relative decline. In a scratch test replace B3 with numeric zero and B4 with 50. D3 becomes negative 100 percent and D4 says No percent base. The absolute October increase is 50. E4 is 250.
- In a separate baseline copy clear B3 instead of typing zero. Both adjacent growth comparisons now state Review missing or invalid because each needs the missing September amount. The running sum formula ignores the empty cell, so avoid presenting it as verified complete without a source completeness check.
- Reset or discard the practice copy. A handoff can name the earlier month for each growth result and identify no usable comparative percent. Write zero percent only when the known earlier and later values genuinely have no relative change and the baseline can support division.
If the result says No percent base when you expected a calculation, inspect the two numeric states. The formula uses COUNT to check that both inputs are numbers in this simple amount exercise. It then checks the earlier amount. If the range contains a date serial or incorrect currency stored as a number, the type check alone cannot prove the record is valid. Reconcile the report against the agreed Amount fields and include the unit in the final label.
Work through a follow-up with a new period and overlapping rules
Compare adjacent months with the same scope
Consider a fictional Instagram-style moderation practice sheet. Its September queue contains 200 cases recorded on the selected review dates. October contains 250 cases on comparable dates. If both counts use one case per row and the same team assignments, the absolute increase is 50 cases and relative growth is 25 percent. A case reassigned from another team can add to the October group without representing a new case in the overall queue. Check which count the audience needs. If the small team grew from 10 to 15 while the full group grew from 200 to 250, those changes are 50 percent and 25 percent respectively. A total growth measure should be computed from the total endpoint values rather than by averaging unrelated subgroup percentage changes.
Test a period with no input export before relying on any report formula. If the source simply has no October file, a formula adding an empty range might show zero. If the October source was complete and contained no qualifying cases, a zero could be real. The two situations need different annotations, even though a displayed subtotal might be numerically identical. Add a separately confirmed source status and count of accepted source records to the report. That preparation lets you explain what "no activity" means and what proves it.
Provide a useful reason when the business rule rejects a record
Say the training support lead wants to label an order for review if the amount is missing or the delivery status is outside the approved list. Then they want one additional rule for valid delivered orders at or above 500. If three conditions have different purposes, separating the review logic can be clearer than one very nested calculation. For example, a helper field can identify a valid amount and another can describe the status rule. The reporting formula uses those fields only for accepted source rows. Interviewers can ask what appears for a Cancelled row with amount 500. It is a valid source row under the example status policy, but it does not receive Big order because its status differs. An unrecognised status should instead receive a review result regardless of amount.
If both Late and Big are actionable, consider separate columns. A first-match formula will choose only one branch. A delivered order with amount 1299 and duration 18 can satisfy both requirements. One metric might count each independently, while an exception list might assign a priority exactly once. Ask which behavior the task requests. If you give a first-match priority answer, deliberately put the record with both conditions through the formula and check that the first labelled outcome matches the defined priority.
Show how moving just one range can pass a weak check
Test the position issue on the original Pune calculation. The three correct source positions are 2, 4 and 7. They should read amounts G2, G4 and G7, which are 64, 110 and 150. If the sum range starts one row lower, they instead read G3, G5 and G8, which are 270, 240 and 1299. Their total is 1809. The included city and status values still look right when you inspect C and I. A verification that only counts matching rows would still announce three. Locate each selected amount on the same order key before approving the result. Both previous and corrected formulas could display a number rather than a diagnostic.
Check another date boundary with values you can explain
Use September 30 and October 1 as two date-only values in a scratch cell pair. Subtraction gives one elapsed day. If a reporting cycle counts both dates inclusively, the expected number of days represented is two. Give the analyst the actual definition before adding one. A timestamp at September 30 23:30 and a timestamp at October 1 00:30 represent one hour apart on the same time basis. A date display may make them appear simply consecutive by day. The result of subtracting the full timestamps is one twenty-fourth of an Excel day. Multiply that elapsed result by 24 for numeric hours when the records share a time basis. If source regions report different time zones or the period crosses a clock adjustment, normalise the source times before claiming an elapsed value.
These variations are also a way to answer a follow-up without relying on a new uncited formula. Name the numeric input, its unit, the source rows and the result you can calculate independently. Then say how you would detect an incorrect interpretation. Restore the original practice workbook once each check is observed. Keep the wording of the business rule beside the practice outputs so they can be reproduced later.
Q19 and Q20. Explain several returned values and their calculation cost
Differentiate an intermediate array from a spilled output
An array is a collection of values in a defined shape. SUMPRODUCT creates intermediate pairwise values but returns one sum. A supported dynamic formula such as =UNIQUE(C2:C11) may return a different number of distinct city labels after the source changes. The top-left formula determines the whole spill. Place the result in the ordinary grid outside an Excel Table; it can read a Table's structured data from there. Leave room for the result and verify the shape when the source grows.
The course data has six distinct cities in first-seen order: Pune, Nashik, Nagpur, Kolhapur, Solapur and Sambhaji Nagar. In a supported environment check that these arrive as a vertical six-cell result. Place a temporary text value in the area the formula would need to use before entering the formula. Excel can return #SPILL!. Clear the obstructing value in the scratch copy, then verify the expected six labels. Removing the blockage does not edit or sort the underlying City column.
Some older array formulas use Ctrl+Shift+Enter and a fixed output area. Modern spreadsheets can support dynamic arrays in more than one released product, but individual function availability varies. Verify the recipient's Excel version and test the specific workbook workflow. A SUMPRODUCT that returns a scalar has long supported array calculations without requiring the same entry process as a legacy array formula. Explain the type of formula you actually used.
Describe volatile functions using recalculation
A volatile function is evaluated when Excel recalculates, even when its own input cells did not change. NOW and TODAY depend on time, and RAND or RANDBETWEEN can produce different samples after recalculation. OFFSET and INDIRECT are also examples. A report based on a signed-off fixed period should usually read its period from an agreed control rather than depending on the instant someone opened it. Keep a deliberate current-time dependency when the business rule actually needs it.
Differentiate a changing clock from the schedule on which Excel recomputes it. A NOW display is not a continuously updating clock simply because it is volatile. Its result is evaluated when calculation runs. A performance claim also needs evidence. Reproduce one action on a copy, measure independent repeated attempts with the same source and environment, inspect the high-cost formulas, and test a simpler design while checking known outputs. Replacing every OFFSET blindly can make a working model harder to understand. Choose where an explicit Table or bounded INDEX arrangement represents the same inputs.
- Use the same reporting window and input key when checking the new formula.
- Show one older workbook dependency the modern design must still support.
- Explain what changes after an edit, a recalculation and a source refresh separately.
- Preserve the raw formula error long enough to diagnose it in a scratch workbook.
State the source rule behind each answer
When asked which formulas you use most, choose two or three related to the role. For example, an operations analyst might use a conditional sum for delivered amounts and an exact lookup for a defined key. State how you verified a boundary delivery and a missing record. When an interview question has a date, explain which dates define its period and how to handle an earlier zero. This lets the interviewer test your logic with a changed workbook instead of only checking whether you remember a function name.
A report that contains both dollar and rupee amounts needs an explicit currency field and conversion or separate grouping. Both values can be stored as numbers with different displays. Adding their magnitudes would yield a unitless result the report cannot explain. The training order fixture treats all amounts as one unit so its 544, 324 and 2870 are comparable. If a real export changes that convention, agree a currency and exchange-rate rule before grouping.
Quiz. Check the named result and counterexample
What value accounts for the difference between all Pune and delivered Pune amounts?
BLK-1009 has 220 and is Cancelled. Pune recorded is 544 and delivered is 324. The rule adds a required status, so the amount gap equals one visible known source contribution. Its absence is a test of the criterion.
What branch should IFS examine first for high at 500 and medium at 100?
Examine the high condition first. At exactly 500 both threshold comparisons would be true. IFS returns the first true branch, so test 500, 499 and 100 when checking the category order.
Why do the delivered weighted calculations use 207 and 17 together?
Both represent the delivered source records. The numerator is elapsed minutes times quantity, while the denominator is the corresponding sum of quantities. Using the all-row weight 24 would include weights for excluded records.
Which function can leave a #REF! visible while replacing a deliberate #N/A?
IFNA replaces only #N/A. A broken reference can then remain observable and be repaired. Record which missing-key cases are ordinary before turning those results into a message.
Is a growth result of zero percent correct when the previous amount is zero?
The usual relative percentage cannot divide by a zero base. State No percent base and consider giving the absolute difference. An observed current zero can produce a valid negative 100 percent when the previous value was positive.
What should you inspect if a distinct city list returns #SPILL!?
Check the expected output range for an occupied cell and confirm the formula sits in the ordinary grid outside the Table. Inspect the spill diagnostics before moving or clearing confirmed obstructions in a practice copy.
Model answers for a short rehearsal
How do SUMIF and SUMIFS differ in your worked example?
I start with the question. SUMIF with one city condition gives all Pune amounts, 544. SUMIFS takes Amount first and adds the Delivered pair, giving 324. They read matching rows across the selected ranges. I check the 220 cancelled record behind the difference.
How do you test a formula whose result depends on several conditions?
I check a known match, one row failing each condition and a value on the boundary. Big order requires Delivered and at least 500. At 500 a delivered row qualifies. With the same amount and a cancelled status it should show the false branch.
Explain a weighted average using one row.
I multiply each measured value by its weight and sum the products, then divide by the matching total weight. BLK-1001 contributes 18 minute-items and two items. When I keep only Delivered I filter both parts. If the denominator is zero I use the agreed unavailable-result policy.
How do you check a monthly running total?
I place periods in the intended order and use a fixed first cell with a moving last cell. The original 200, 250 and zero yield 200, 450 and 450. I verify the first period and any reset between years. A missing month needs explanation because a sum can ignore it.
Why would you keep one volatile formula and remove another?
I keep the dependency if the report actually needs a current time or new random sample after recalculation. I consider replacing repeated costly dependencies when a named bounded input can give the same result. I compare measured performance, verify source scope and test the agreed outputs.
Recall cards
Amount range order
SUMIF starts with the criterion range. SUMIFS starts with the sum range.
First true branch
Order overlapping thresholds deliberately and test the exact boundary.
Matched weights
Apply the same population to the weighted products and total weights.
Expected error
Preserve unexpected failure types when handling expected missing data.
Previous amount
Growth divides by the earlier amount. Zero bases and missing bases need distinct treatment.
Spill shape
The anchor formula owns a dynamic result. Verify the destination space and version.
Official references
Continue practising: explore the existing Excel Task Hub for additional exercises.