+ Reply to Thread
Results 1 to 4 of 4

Running the same command multiple times

  1. #1
    Registered User
    Join Date
    12-10-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    4

    Running the same command multiple times

    Hi Guys
    I hope to get a bit of help, even a start up would be great..thanks

    All I wanted to know was if there is a function to repeat a command multiple times down the rows?

    Thanks a lot

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Running the same command multiple times

    You need to be specific in describing what you want to achieve. In terms of VBA, repeating commands is usually done by using loops.

  3. #3
    Registered User
    Join Date
    12-10-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Running the same command multiple times

    thanks for your reply
    i have 5 rows for each name from which i generated those graphs
    for example
    James
    Row 1
    Row 2
    Row 3
    Row 4
    Row 5
    John
    Row 1
    Row 2
    Row 3
    Row 4
    Row 5

    So the data in each row changes however, the names of the rows do not change

    so i want a code that would allow me to produce the exact same graph for john that i produced for james..and there are about a thousand names and so many more worksheets so i want it to be done automatically. that is what i meant by repeating a command multiple times down the row for each set of name.

    There is a filtering option for the names column but not for rows.

    so if the items are filtered, it should still produce graphs till the time it find some empty cell.

    I was thinking of using,this

    for i = 1 to 53
    ...do your code
    next i

    But i am not sure

    I hope you understand what i mean???!.. please let me know if you dont

    thanks again
    Last edited by mej; 12-10-2013 at 11:47 PM.

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Running the same command multiple times

    Unfortunately, it's still not very clear. It would be good if you can post a sample of your workbook.

    What graph are you talking about?

    Are the 5 rows going to be inserted by the macro or are they already existing data?

    How are the newly created graphs going to be placed?

    There is a filtering option for the names column but not for rows.
    This is hard to be visualized without looking at sample data.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro for running the SQL code multiple times
    By sawoodalam1989 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2013, 08:35 PM
  2. Macro for running the SQL multiple times
    By sawoodalam1989 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-27-2013, 07:00 AM
  3. Using the IF command multiple times within on Sub
    By colin_emma in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-22-2012, 07:38 AM
  4. help fixing my macro from running multiple times
    By MurseBry in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2010, 02:17 AM
  5. running loop multiple times?
    By mister tom in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2010, 01:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1