> ## Content Index
> Fetch the complete content index at: https://nolongerset.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Sticky Wicket: Looping by Month
- URL: https://nolongerset.com/sticky-wicket-looping-by-month/
- Published: 2021-02-20T16:20:49.000Z
- Updated: 2026-05-08T13:06:11.000Z
- Description: Some programming problems are difficult to solve. Others are difficult to solve clearly.
- Author: Mike Wolfe
- Tags: Code Library, #Date Functions, #Import 2026-05-20 02:59

"Sticky wicket." That's a fun phrase to say, isn't it?

> A sticky wicket is a metaphor used to describe a difficult circumstance. It originated as a term for difficult circumstances in the sport of cricket, caused by a damp and soft pitch. [*Wikipedia*](https://en.wikipedia.org/wiki/Sticky%5Fwicket)

Writing a loop that iterates one month at a time is a subtly tricky problem. The difficulty isn't so much in writing the code itself. The challenge is to write the code in such a way that your intent is clear to the reader.

One of my favorite programming quotes is this gem from [Martin Fowler](https://en.wikiquote.org/wiki/Martin%5FFowler):

> "Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

With this in mind, I'll be writing a series of short articles over the next several days exploring several different approaches to looping by month.

- [Using DateSerial](https://nolongerset.com/looping-by-month-dateserial/)
- [Using a custom MonthVal() function](https://nolongerset.com/looping-by-month-custom-functions/)
- [Using a Year/Months lookup table](https://nolongerset.com/looping-by-month-lookup-table/)

If you have a preferred method for solving this *sticky wicket*, I'd love to hear it. Let me know [@NoLongerSet](https://twitter.com/NoLongerSet) on Twitter or via email (mike at nolongerset dot com).

**UPDATE:** *Reader submissions (shared with permission):*

- Loop Until using DateAdd

*Image by [foxycoxy](https://pixabay.com/users/foxycoxy-2935058/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=2639131) from [Pixabay](https://pixabay.com/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=2639131)*