Alex Selby-Boothroyd, Head of data journalism
AI is great at tackling the small, tedious tasks that can free up time for more valuable things. Despite working with spreadsheets for longer than I care to remember, I still rarely get a complicated formula right on the first—or even fifth—attempt. But ChatGPT has no problem keeping track of how many brackets to use and where they go. I recently wanted to extract the date from a bunch of URLs like this:
economist.com/graphic-detail/2024/02/09/five-reasons-why-indonesias-election-matters
I gave Bing’s Copilot this prompt:
I have a URL in cell A1 that contains a date in the format YYYY/MM/DD that always starts after the second forward slash. Please give me a formula that extracts the date and converts it to the format DDD DD MMM YYYY
And five seconds later it returned this formula, which worked perfectly first time:
=TEXT(DATEVALUE(MID(A1, FIND("/", A1, FIND("/", A1) + 1) + 1, 10)), "ddd dd mmm yyyy") |