Okay, excellent! Knowing you're on a modern Excel version and that "Points" are manually populated simplifies things greatly. The crucial detail is the "Task X (Date)" format in your Submissions table.
We'll focus on the XLOOKUP solution to automatically fill the "Task X" completion times.
Revised Setup & Example Structure:
Let's assume your sheets and column headers look like this:
1. Submissions Table (Sheet Name: SubmissionsData)
(Let's call this table SubmissionsTable)
| Participant Name | Task Number | Completion Time |
|---|
| Alice | Task 1 (June 2) | 0:05:12 |
| Bob | Task 1 (June 2) | 0:06:30 |
| Alice | Task 2 (June 5) | 0:10:05 |
| Charlie | Task 1 (June 2) | 0:07:00 |
| Bob | Task 2 (June 5) | 0:09:15 |
| Alice | Task 3 (June 10) | 0:12:30 |
| ... | ... | ... |
2. Participants Table (Sheet Name: ParticipantsData)
(Let's call this table ParticipantsTable)
| Participant Name | Task 1 | Points 1 | Task 2 | Points 2 | ... | Task 11 | Points 11 |
|---|
| Alice | | | | | | | |
| Bob | | | | | | | |
| Charlie | | | | | | | |
| ... | | | | | | | |
The XLOOKUP Solution for Completion Time
The core idea is still to combine Participant Name and Task Number for the lookup. However, we need to extract the pure number (e.g., "1" from "Task 1 (June 2)") from both your Participants table headers and your Submissions table's "Task Number" column.
Formula for Task 1 Completion Time (in cell B2 of ParticipantsData sheet, assuming "Participant Name" is in A1, "Task 1" in B1):
=XLOOKUP(
$A2 & VALUE(MID(B$1, FIND(" ", B$1)+1, 99)),
SubmissionsTable[Participant Name] & VALUE(TEXTBEFORE(TEXTAFTER(SubmissionsTable[Task Number], "Task "), " (")),
SubmissionsTable[Completion Time],
""
)
Let's break down this formula part by part:
-
$A2 & VALUE(MID(B$1, FIND(" ", B$1)+1, 99)) - The lookup_value:
$A2: Refers to the Participant Name in the current row (e.g., "Alice"). The $ locks the column A so you can drag the formula right.
MID(B$1, FIND(" ", B$1)+1, 99): This extracts the task number from your Participants table header (e.g., "Task 1").
FIND(" ", B$1): Finds the position of the first space in the header (e.g., in "Task 1", it's after "Task").
+1: Moves one character past the space, to the beginning of the number.
MID(..., ..., 99): Extracts characters starting from that position for up to 99 characters (more than enough for a task number).
- Example: For "Task 1", this returns "1".
VALUE(...): Converts the extracted text ("1") into a numerical value (1).
- The
$ before 1 in B$1 locks the row, so when you drag the formula down, it always looks at the header row.
- Result: This part creates the combined lookup string (e.g., "Alice1", "Bob2").
-
SubmissionsTable[Participant Name] & VALUE(TEXTBEFORE(TEXTAFTER(SubmissionsTable[Task Number], "Task "), " (")) - The lookup_array:
SubmissionsTable[Participant Name]: This directly refers to the participant names in your Submissions table.
TEXTAFTER(SubmissionsTable[Task Number], "Task "): This extracts the part of the string after "Task ".
- Example: For "Task 1 (June 2)", it returns "1 (June 2)".
- For "Task 5", it returns "5".
TEXTBEFORE(..., " ("): This extracts the part of the string before " (".
- Example: For "1 (June 2)", it returns "1".
- For "5" (if " (" is not found), it will still return "5" (this is the default behavior if the delimiter isn't found, making it robust).
VALUE(...): Converts the extracted text ("1", "2", etc.) into a numerical value.
- Result: This creates an array of combined strings from your
Submissions table (e.g., {"Alice1", "Bob1", "Alice2", ...}), which XLOOKUP searches through.
-
- The :
How to Apply the Formula:
- Convert to Tables (Highly Recommended):
- Click anywhere in your
Submissions data. Go to Insert > Table (Ctrl + T). Check "My table has headers". Name it SubmissionsTable in the Table Design tab.
- Do the same for your
Participants data, naming it ParticipantsTable.
- Enter the Formula:
- Go to your
ParticipantsData sheet.
- In cell
B2 (the first cell under "Task 1"), paste the formula provided above.
- Press
Enter.
- Fill Right:
- Click on cell
B2 again.
- Drag the fill handle (the small green square at the bottom-right corner of the cell) horizontally across all "Task X" columns (i.e.,
B2, D2, F2, etc.) until Task 11. The column references (B$1) will automatically adjust.
- Fill Down:
- With all the "Task X" cells in row 2 still selected, drag the fill handle down to apply the formula to all your participants. The row references (
$A2) will automatically adjust.
Now, your Participants table will automatically populate the completion times for each task from your Submissions table!