# Microsoft Office Application Help - Excel Help forum > For Other Platforms(Mac, Google Docs, Mobile OS etc) >  > [SOLVED] Nested FOR loop from multiple FOR loops

## Chilton

I am completely new to the world of VB... and need some help resolving a "Compile Error: Procedure too large" problem.

I have a spreadsheet with two (2) columns of numbers: 1) Store # and 2) # of codes. I need to replicate the Store Number (Column 1) in a separate column as many times as the Number Of Codes (value in Column 2). My actual spreadsheet has 448 rows of data which must be replicate din this way.

Sample Columns:

StoreNumber	Number of codes
29	                       75
67	                       75
71	                     125

Here's what I have created 448 times in a single Macro:




```
Please Login or Register  to view this content.
```


How do I create a nested FOR loop that will cycle through all 448 rows and produce approximately 44,625 cell values representing the Store Numbers replicated as many times as required by the Number of Codes column?

I really appreciate your help!

Chilton

----------


## mike7952

Is this what your wanting?




```
Please Login or Register  to view this content.
```

----------


## Chilton

Mike,

You are awesome! Thanks so much. Can I ask you a favor? Can you add comments to each line telling me what it's doing? As I said, I am COMPLETELY new to VB and would like to understand the syntax better as I use it to improve my productivity.

Thanks Again!

Chilton

----------


## mike7952

```
Please Login or Register  to view this content.
```

----------

