I’ve been experimenting with Excel Macros (VBA) to color in worksheet cells, create pixel art, and bring those images to life through animation! Here’s a quick look at what it looks like ↓
On this page, I’ll introduce the core logic that serves as the foundation for all these movements. By combining these basic building blocks, you can create all sorts of fun and creative projects!
Before Getting Started
“I have Excel on my computer, but I’ve never used macros before and have no idea how to write code.”
If that sounds like you, don’t worry! I’ve put together an absolute beginner’s guide below. It covers everything from how to enable the Developer tab to writing and running your first script. Even complete beginners can follow along smoothly. Be sure to check it out first!

Excel Animation Basics #1: Vertical Line
This is a super simple animation that runs a loop through rows while keeping the column fixed, continuously filling cells with color as it moves. In this example, we color cells from top to bottom.

It colors rows 1 to 50 in Column P black. If you find this intriguing, check out the detailed explanation on the [Ultra-Beginner Guide] page mentioned above!
Excel Animation Basics #2: Cross Lines
After filling cells vertically (top to bottom), this logic continues by filling cells horizontally (left to right).

This one is also fairly straightforward!
Excel Animation Basics #3: Moving Dot Animation
This makes a single dot (a black-filled cell) appear to travel from top to bottom. The trick here is clearing the previously filled cell during the next iteration of the loop.

I added a brief delay/pause inside the loop—otherwise, the code executes so fast that the eye can’t track the movement!
Excel Animation Basics #4: Top-to-Bottom Zigzag
An application of Basics #2, combining top-to-bottom movement with horizontal shifts. Once the dot reaches a certain edge, the horizontal direction reverses.

The logic isn’t as complicated as it might look! Once things start moving on screen, you can’t help but follow along with your eyes.
Excel Animation Basics #5: Diagonal Down-Right with Top/Left Fill
This moves the active cell down-right diagonally one cell at a time, while filling the cells immediately above and to the left of its new position.

Applying this logic feels like a domino falling effect that could gradually reveal a hidden picture underneath. I’ll definitely give that a try in a future project!
Next Steps
I’ll keep adding new basic techniques as I create them. Next up is the Intermediate Techniques page!(Sorry.. now Japanese only)

💡 Recommended Setup: Dual-Monitor Workflow
To observe animation movements in real-time while writing code, setting up a dual-monitor environment (laptop/PC + external display) is overwhelmingly convenient.
In my personal development workflow, I connect a 27-inch external monitor. I keep the VBE (Code Window) on the external display and Excel (Worksheet) on the laptop screen side-by-side. This eliminates the hassle of constantly pressing Alt + Tab to switch windows!
If you’re considering adding an external display, a standard, cost-effective model like the one below is a great choice:
コメント