Discussion thread for day 1 of the Advent of Code - https://adventofcode.com/2025/day/1
saw a lot of same approach. good challenge for mod function
- add initial line instead of manipulate multi-row.
- use generate row to +-1 instead of complex formula.
- use mod to limited to 0-99
The challenges on Day 1 were quite interesting.
Nice and easy to start with, and I had one of those builds where I accidentally answered part two from building part one.
I began by using regex to parse out the bits of each turn, namely the Direction letter, the last two digits (I'll come back to this) and the leftover. To do this I used the following:
I parsed the last two digits as we only need these to determine the move. 762 is the same as 62 for part one, so I simply chopped it into three:
I then used a multi-row to determine position:
This gave me the answer for Part One, and given I had split the original data into three columns, the "leftover" bit was essentially the extra clicks, given these were numbers of hundreds, which would always be an extra click per hundred, and so I simply needed another multi-row formaula to determine the number of clicks from the actual moves, then add the hundreds:
Then simply sum this column.
And Robert's your father's brother.
A nice start to AoC. Probably the only day I'll get a chance to do this, but here's hoping.
M.
Some refactoring needed for step 2 but we got there.
I love my multi-rows.
Filter for Part 1, summarise + filter for part 2.
Definitely didn't do this the most efficient way, but it works!
As the approach for Part 1 did not work, I started from the scratch for Part 2, and it worked.
Firstly shout out to @clmc9601 for he fantastic starter kit :) Gave that a little tweak to use my own template and @cgoodman3's testing macro to make this so much smoother <3
and
Day1.
