The CSV You Opened Wasn’t the Latest One

Yosef Gerson
Spreadsheet and data writer
2 min read
AI-assisted

Author's AI disclosure

The author reports using AI to help with this article.

The author confirms reviewing this article.

The CSV You Opened Wasn’t the Latest One
Article

By Yosef Gerson

At 9:02, you download orders.csv. At 9:04, you download it again. The second file is newer. That’s the one you use.

Newer in Downloads, anyway. Inside, it’s still Monday.

Say you’re preparing a Wednesday, December 2 report for two stores. The source system says Tuesday, December 1, is the last day it finished processing. One export has Monday’s rows: 18 orders at North and 11 at South. The other adds Tuesday: 21 at North and zero at South. Both files can land in Downloads on Wednesday. The time on the file tells you when you got it, not which day the data covers.

Start with the day the source says is closed

In the demo sheet, put the last closed day in B4 as a real date. Take it from the source’s reporting status, not the clock on your laptop. Some reports close late. Some skip weekends. “Yesterday” is not a rule you want to discover is wrong on a Monday morning.

Column A holds the business date, column B the store, and column C the order count. In B5, check the latest date inside the export:

=IF(COUNT(A10:A100)=0,"",MAX(A10:A100))

The Monday file stops at November 30, so the sheet says Stale export. Make sure the imported business dates are date values, not text: MAX ignores text in a range. The demo uses real dates.

A current date can still be missing a store

Now take the Tuesday export and delete the South row. The latest date still says December 1. If all you checked was the date, you’d send the report. And you might read the missing South row as “no orders.”

But South reporting zero orders and South not reporting at all are two different things. This export is a daily summary: it promises one row per store per closed day, including stores with zero orders. So count the expected rows on December 1, starting with North in B6:

=COUNTIFS(A10:A100,$B$4,B10:B100,"North")

Repeat in B7 for "South". Each count should be exactly one. Two North rows are not a substitute for one North and one South.

The partial export reaches December 1 but contains one North row and no South row for that date. The sheet displays Incomplete day.

In a raw transaction export, a store with no sales might legitimately have no rows. Don’t carry this rule over blindly. Find a close report or another source that tells you which stores finished sending their data.

Try it with the three tabs in the demo: Stale never reaches Tuesday, Partial reaches Tuesday without South, and Complete has a South row with a real zero. The two Tuesday files have the same latest date. Only one tells you what happened at both stores.

Before you send a report, ask two questions: Did the file reach the day I need? And did everyone who was supposed to report actually report? A recent timestamp answers neither.

Google Sheets: MAX · Google Sheets: COUNTIFS

Sample exports

Excel workbook

Stale CSV · Partial CSV · Complete CSV

Comments0

Log in to join the discussion.

No comments yet.

Yosef Gerson
Yosef Gerson

Spreadsheet and data writer

I’m Yosef Gerson. I write practical guides about spreadsheets, data and the small details that can change what a number actually means. I’m interested in the gap between a result that looks right and one you can trust. My articles work through real spreadsheet questions step by step, with examples you can follow and checks you can use on your own work.

Subscribe to Yosef Gerson's newsletter

Get the articles this author chooses to send by email.