title: How to repeat a macro code for fixed number of rows in Excel?
body: <p>I'm totally new to macros and VB so would be grateful for any help. 
  I have excel data in this form:</p>
  
  <pre><code>Clip    PSNR-codec1     PSNR-codec2     Bit Rates 
  Video1  29.426086       29.220891       94357
  Video1  31.207342       31.703124       322832
  Video1  34.474587       34.255598       633468
  Video1  36.445279       35.479189       936961
  Video1  39.093937       36.4768         1539093
  Video2  41.156012       37.295318       326742
  Video2  43.355358       37.684239       604494
  Video2  29.95337        29.30644        1218206
  Video2  32.040252       30.837518       1809751
  Video2  34.194409       32.774954       2387549
  Video3  35.495356       33.806537       1567065
  Video3  36.395173       34.544676       2173151
  Video3  37.077718       35.234943       3094348
  Video3  35.681498       36.036972       3240981
  Video3  171.661771      83.104314       3355959
  Video4  171.247791      96.978608       5103370
  Video4  185.239286      128.064048      6636778
  Video4  189.115735      115.418461      8150015
  Video4  185.35225       154.3189011     2345629
  </code></pre>
  
  <p>My requirement is to create a chart of type "XYScatterSmooth" in a <strong>separate sheet for each video</strong>. The graph should have bit rates on X axis and PSNR on Y-axis. Going forward , we will have data for more videos too. So how do I write a macro which will repeat these steps for each video (i.e Loop should repeat for every 5 lines . 5 lines of data is fixed number)</p>
  
  <p>Excel Version: 2010  </p>