Crispo - Excel Challenge 20 2025

excel-challenges
weekly-exercises
Easy Sunday Excel Challenge
Published

May 18, 2025

Illustration for Crispo - Excel Challenge 20 2025

Challenge Description

Easy Sunday Excel Challenge

⭐ Problem Solution Start End Skip Repetition

Solutions

library(tidyverse)
library(readxl)

path = "files/2025-05-18/Challenge24.xlsx"
start = 2
end = 7
skip = 4
repetition = 3
test = read_excel(path, range = "G3:G18")

result = data.frame(List = rep(setdiff(start:end, skip), each = repetition))

all.equal(result, test, check.attributes = FALSE)
#> [1] TRUE
  • Logic:

    • Reads the workbook range needed for the challenge
  • Strengths:

    • The R solution stays compact and mirrors the workbook logic closely.
  • Areas for Improvement:

    • The code assumes the workbook layout and named ranges remain stable.
  • Gem:

    • The best part of the solution is choosing a tidy intermediate shape before producing the final answer.
import pandas as pd

path = "files/2025-05-18/Challenge24.xlsx"
start, end, skip, repetition = 2, 7, 4, 3
test = pd.read_excel(path, usecols="G", skiprows=2, nrows=16)

lst = [i for i in range(start, end+1) if i != skip] * repetition
result = pd.DataFrame({'List': sorted(lst)})

print(result.equals(test))
  • Logic:

    • Reads the workbook range needed for the challenge

    • Applies the rule iteratively until the output is complete

  • Strengths:

    • The Python version keeps the same rule in a direct pandas-oriented workflow.
  • Areas for Improvement:

    • As with the R version, any workbook layout change would require small adjustments.
  • Gem:

    • The implementation stays close to the stated challenge instead of adding unnecessary complexity.

Difficulty Level

This task is easy to moderate:

  • The business rule is readable, but the workbook still needs a few careful transformation steps.