Skip to content

SheetRoutine

Spreadsheet tutorials for Excel, Google Sheets and LibreOffice. Each one ends with a working file you can download.

Find the last entry in a log column in Excel with LOOKUP

The reading that matters in a meter log is the last one, and the last one keeps moving as the log grows. One formula finds the bottom of the column — no fixed row, no counting rows by hand.

Written 12 November 2026

Result

Last reading (13 November)1598
Usage since 2 November (kWh)358
Readings logged, of 12 days10

Download the spreadsheet: last-entry-in-a-log.xlsx (5,322 bytes)

It contains the twelve-day meter log with its two blank days, and the last-reading, last-date, usage, and count cells.

1What you need

2The log

A meter log grows downward: one row a day, newest at the bottom. This one covers 2 to 13 November 2026, and two days were missed — the 8th and the 12th have no reading:

DateReading (kWh)
2026-11-021240
2026-11-031275
2026-11-041311
2026-11-051348
2026-11-061380
2026-11-071419
2026-11-08—
2026-11-091490
2026-11-101526
2026-11-111561
2026-11-12—
2026-11-131598

The last entry is the one that matters — usage bills from the latest reading — and it is not in a fixed row, because next week the log will be longer. The formula has to find the bottom of the column wherever it currently is.

3The last reading

E2  =LOOKUP(10^307,B3:B14)

LOOKUP, in its one-argument form, searches a column for a value and returns the matching entry. When it cannot find the value, it matches the largest value in the column that is less than or equal to the one asked for (LOOKUP function — Microsoft Support). The first argument, 10^307 — a 1 followed by 307 zeros — is far larger than any reading a meter will ever show, so no reading can equal it — and the match lands on the largest reading at or below it, which, in a column that only rises, is the last one: 1598. The two blank days do not disturb the result; a blank holds no number to match.

4The last date

Dates are stored as numbers — each day is one more than the day before — so the same formula over the date column returns the date of the last entry:

E3  =LOOKUP(10^307,A3:A14)

Formatted as a date, the result is 13 November 2026. A last-reading figure with its date beside it can be quoted without opening the log.

5Usage over the period

E4  =B3
E5  =E2-E4
E6  =COUNT(B3:B14)

The first reading, 1240, is pulled into E4 so the usage formula reads plainly: last minus first is 358 kWh. COUNT returns 10 — the number of readings actually taken, out of twelve days. COUNT counts numbers only, which is what makes it the right way to count a log with blanks in it.

6When the log grows

New days go at the bottom, and the ranges have to grow with them: a reading added in row 15 is outside B3:B14, and every formula keeps answering for the old log. Extend the ranges to the new bottom row — or size them generously from the start, with room below the data. The one thing not to do is leave the formulas pointing at a range the log has outgrown; the answers stay plausible while quietly going stale.

Traps

A column that does not rise. LOOKUP's values must be in ascending order for the match to be reliable; Microsoft states that otherwise LOOKUP might not return the correct value (LOOKUP function — Microsoft Support). A meter log rises by nature. A log of daily temperatures does not, and this formula is the wrong tool there.

Notes typed into the reading column. A word typed where a number belongs — “away”, “est.” — turns the column into a mix the numeric search was not built for. Notes belong in their own column.

Using the same trick on names. The huge-number form matches numbers and dates. The last entry of a column of names or statuses is a different problem and needs a different formula; this one will not find it.

Sources