Cellgrids Cellgrids
Home › Practice questions › INDEX › Question 9

Excel INDEX Practice Question: Using INDEX with MOD, return the weekday name for the day number typed in D2…

By Rinkesh Shah, founder of Cellgrids.

The question

Using INDEX with MOD, return the weekday name for the day number typed in D2 and put it in E2. Day 8 starts again from Monday, so day 10 wraps around.

The data

ABCDE
1DayDay no.Name
2Mon10?
3Tue
4Wed
5Thu
6Fri
7Sat
8Sun

The yellow cell is where your answer goes.

Show answer

Answer in E2: Wed

How it works

Explanation: MOD keeps the position between 1 and 7 however large the day number is. Subtract 1 before MOD and add 1 after so day 7 stays at 7.
Syntax: =INDEX(A2:A8,MOD(D2-1,7)+1)
MOD(10 - 1, 7) = 2, and 2 + 1 = 3. The third name is Wed.

Try it yourself in the live sheet

Type your formula in the highlighted cell and get instant feedback. Free, no Excel install needed.

Try this question in the live sheet →

INDEX syntax

=INDEX(array, row_num, [column_num])

Returns the value at a given row/column position within a range. Pulling the Nth item from a list — often paired with MATCH to look up in any direction. Full INDEX guide.

More INDEX practice questions

All practice questions · Excel exercises · Interview prep · Cheat sheet