Advent of Code Solutions Thread: Day Two

Only shitty solutions allowed

38
Jump in the discussion.

No email address required.

Okay day 2 of Excel Formula challenge

First I had a column with 2 IF statements to give points for rock/paper/scissors, but getting the loss/win/draw would be 8 nested IF statements to check every matchup so I did a VLOOKUP/MATCH on a pivot table to get the result. Then summed those two and got the answer!

Table used (located at cell H1):

"	X	Y	Z
A	3	6	0
B	0	3	6
C	6	0	3
Formula to get result: =VLOOKUP(A1,H$1:K$4,MATCH(B1,H$1:K$1,0),FALSE)

I know I could have used a simpler table that lists out every matchup and their result in the same row but that was no fun

...working on pt2...

Just had to swap the numbers and the player choice on the table. but spent like 10 minutes wondering why the number was coming out low

was summing 1-2499 instead of row 1-2500 :marseyrage:

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.