How I add data to Excel using loop?

Hi,
first sorry for my english!
I’ve been making first level Foundation Training about Excel, exacly: Lesson 9 - Practice 1 Walkthrough.
There is loop which iterates for rows and matches colors (For each row). Next this loop writes comment into the output.
I want change this last thing, and write these comments to the excel cells, in the same rows in third column (only when these colors are the same).
I don’t now haw to write properly “Write cell” range property.

this lesson