+ Reply to Thread
Results 1 to 4 of 4

Populated a list based with repeating value based on # in adjacent column

Hybrid View

  1. #1
    Registered User
    Join Date
    03-20-2013
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    2

    Populated a list based with repeating value based on # in adjacent column

    Hi everyone,
    First I'd like to say that I am happy to have found this forum!
    Second english is not my mother tongue so I might be a bit difficult for me to expaline what I am looking for but hopefully it iwll work out with a sample. Basicly would like to have a list to be populated based on the number I have entered. EX

    A1= "Car"
    B1 = 3

    I would like for C1 = "Car", c2 = "Car", C3 = "Car", C4 = blank

    Additionnaly if I do A2 = "Moto" and B2 = 5. I would like for C1 = "Car", C2 = "Car", C3 = "Car", C4 = "Moto", C5 = "Moto", C6 = "Moto", ETC...

    Not easy to explain, Sorry. But thank for anyone that can help me with that!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Populated a list based with repeating value based on # in adjacent column

    Hi and welcome to the forum

    for the 1st part, try this, copied down...

    =IF(MOD(ROW(),3)=0,"",$A$1)

    Im working onthe 2nd part, but what do you want if both conditions are met - ef row 15?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Populated a list based with repeating value based on # in adjacent column

    tark_o,

    Welcome to the forum!
    Attached is an example workbook based on the criteria you described.
    Row 1 is a header row so actual data starts on row 2
    In column A you type the value that will be repeated (like "Car" or "Moto")
    In column B you enter the quantity (how many times the value will be repeated)
    Then column C generates the list based on your entries. In cell C2 and copied down to C101 (so the list can show 100 total items, copy down further as needed) is this formula:
    =IF(ROWS(C$1:C1)>SUM(B$2:B2),"",INDEX(A$2:A2,MATCH(ROWS(C$1:C1)-0.1,INDEX(SUBTOTAL(9,OFFSET(B$1,,,INDEX(ROW(B$1:B2),))),))))


    Does that work for you?
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    03-20-2013
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Populated a list based with repeating value based on # in adjacent column

    Oh man! that works perfectly. Been trying to do this for the past 3 months and I have resorted to copying and pasting... sometimes up to 10 value and up to 250+ quantities.

    Thank you very much everyone that looked into it and a special thank you to Tigeravatar!

+ 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