+ Reply to Thread
Results 1 to 6 of 6

How to repeat vba code a number of times depending on items in an excel list

  1. #1
    Registered User
    Join Date
    10-04-2011
    Location
    Windsor, England
    MS-Off Ver
    Excel 2010
    Posts
    69

    How to repeat vba code a number of times depending on items in an excel list

    Hi everyone,

    I'm sure this should be pretty simple however I'm missing a step somewhere think.

    I have a list of part numbers in excel which changes (both in length and the parts on it) every month, I have a dynamic range set up to accommodate for this.

    For each part number I need to run a series of calculations for which I have written code for but I currently have to manually change the part number in cell k3 and then click to run the macro. I know I should be able to do some sort of loop in vba but I can't work it out.

    What I have so far is...

    Please Login or Register  to view this content.
    Could someone give me a hint as to where I'm going wrong?

    Thanks,

    Alice
    Last edited by qaliq; 09-17-2013 at 04:51 PM. Reason: Changed title!

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to repeat vba code a number of times depending

    Where are the part numbers listed?
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    10-04-2011
    Location
    Windsor, England
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: How to repeat vba code a number of times depending on items in an excel list

    They are listed in excel in a named range called excelpartlist

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to repeat vba code a number of times depending on items in an excel list

    Perhaps
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-04-2011
    Location
    Windsor, England
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: How to repeat vba code a number of times depending on items in an excel list

    Unfortunately I get a runtime error when I try that...

  6. #6
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: How to repeat vba code a number of times depending on items in an excel list

    Lets take a step back and establish exactly what your code is supposed to accomplish.

+ 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. [SOLVED] How to repeat the same number for 'N" number of times in excel sheet
    By tulasiram in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-12-2013, 03:06 AM
  2. Replies: 1
    Last Post: 04-04-2013, 10:53 AM
  3. Repeat value depending on number of entries in another range
    By Sally Rose in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-27-2013, 10:48 AM
  4. [SOLVED] VBA: repeat a formula a number of times
    By dinahajjar in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-24-2013, 11:03 AM
  5. Repeat a cell value in another column X number of times
    By art1234 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-31-2011, 02:36 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