Hi all,

I am trying to program excel to automatically skip to the next row down and keep filling up cells, as I stretch a formula across horizontally from a manually given starting position.

This is the formula that works for this purpose. As it is right now, it is displaying correct info. I just want to condense it is a way that after 8 cells it will continue to fill out cells on a new row.

Here is the formula:
=IF(AND(MOD(COLUMNS($A$1:A$1),2)=1,COLUMNS($A$1:A$1)+1<=2*$A1),$B1 &" #"&(COLUMNS($A$1:A$1)+1)/2,"")

What I am trying to do is to create a timetable of courses. Each course has a set amount of classes. A1 represents the amount of classes, and B1 represents the name of the course as text. This formula fills alternating cells because according to my set timetable, a course cannot be on consecutive days, hence I need a full cell followed by an empty cell.

what I want is, that after 8 cells (regardless if they are full or empty), Excel will continue to fill out any remainder cells on a new row in the same fashion.

I was told VBA would be the way to go with this.

Any thoughts?

Thanks in advance,
Eitan