Sitemap
made with gemini AI

Member-only story

Why Max() beats Sort() every time.

A Better Way to Look Up Exchange Rates in

7 min readApr 2, 2026

Back in 2022 I wrote about working with exchange rates in Coda. The setup was simple: I ran services billed in EUR and USD, and for each invoice I noted the exchange rate as I found it on my credit card statement. Coda then multiplied amount by rate. Job done.

It worked. But manual rate entry doesn’t scale. The moment you’re tracking dozens of transactions across multiple currencies — EUR, CAD, JPY, USD — you’re doing a lookup job that a formula should be doing for you, and that shift in responsibility is exactly what this blog is about.

This blog is about doing it properly. And along the way, I want to make the case for a specific formula pattern that I see underused: Max() combined with WithName(), replacing the more common but heavier Sort() + Last().

The architecture

The foundation is a strict separation of concerns across two base tables.

DB Exchange Rates is a snapshot table. Each row records a date, a target currency (EUR, CAD, or JPY), and the rate against USD on that date. USD never appears as a target currency — it’s always the base. The table is append-only: you never edit old rates, you add new ones. This gives you a full historical record and makes the…

--

--

Christiaan Huizer
Christiaan Huizer

Written by Christiaan Huizer

I write every week about how to Coda . You find blogs for beginners and experienced makers. Until 7 days after publication you read my blog for free. Welcome!