Bill,
In your specific example you can actually populate the row with Excel Formulae and no VBA. You need to do the following things (ignoring the double quotes - they are there to delineate what to type):
1) Type the value "101" in cell A4
2) Type the formula "=A4" into cell B4 and fill right into cell C4
3) Type the formula "=A4+1" into cell D4 and fill right into every cell over to HQ4
If what you're after is a slightly less predictable new value in every thrid cell then you might want to consider setting up a lookup table. The formula "=INT((COLUMN(A1)+2)/3)" written in a row of cells will produce a periodic incremental lookup value index which could then be used with the INDEX function on a custom table to pull through less predictable periodically changing values - i.e. Type a table of values into cells A5 to A22 and then write the following formula in Cell A4 to be filled right "=INDEX($A$5:$A$22,INT((COLUMN(A1)+2)/3))".
You can also do stuff with VBA but it sounds like this is not the most appropriate solution
Maccas
|