+ Reply to Thread
Results 1 to 6 of 6

Repeat item 12 times for 12 months

  1. #1
    Registered User
    Join Date
    09-04-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    49

    Repeat item 12 times for 12 months

    In column H, I have a list of part numbers. 100-00-001, 100-00-005, etc.

    In column B, I want to list each part number 12 times so I can load in one value per month. So the value in H3 will go in B3 through B14, H4 will go in B15 through B27, etc. There are hundreds of items so I need to automatize it, not do it manually.

    How do I do this?

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Repeat item 12 times for 12 months

    How about this tiny macro:

    Please Login or Register  to view this content.

    Macros are very easy to install and use:

    1. ALT-F11 brings up the VBE window
    2. ALT-I
    ALT-M opens a fresh module
    3. paste the stuff in and close the VBE window

    If you save the workbook, the macro will be saved with it.

    To remove the macro:

    1. bring up the VBE window as above
    2. clear the code out
    3. close the VBE window

    To use the macro from Excel:

    1. ALT-F8
    2. Select the macro
    3. Touch RUN

    To learn more about macros in general, see:

    http://www.mvps.org/dmcritchie/excel/getstarted.htm



    Macros must be enabled for this to work.
    Gary's Student

  3. #3
    Registered User
    Join Date
    09-04-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Repeat item 12 times for 12 months

    Thank you! I'm going to try this now!

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Repeat item 12 times for 12 months

    Good Luck!

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Repeat item 12 times for 12 months

    A formula perhaps..

    =INDEX($H$3:$H$14,INT((ROW(A1)-1)/12)+1,)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  6. #6
    Registered User
    Join Date
    09-04-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Repeat item 12 times for 12 months

    This is excellent - thank you both! I'm going to mark this thread resolved.

    I have a similar question I just posted -- will try to figure out how to apply these principles to it. You are invited to give your ideas on it as well:

    http://www.excelforum.com/excel-gene...html?p=2957458

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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