+ Reply to Thread
Results 1 to 2 of 2

nested loop with concatenation with many columns

  1. #1
    Registered User
    Join Date
    06-26-2015
    Location
    nyc
    MS-Off Ver
    2007
    Posts
    4

    nested loop with concatenation with many columns

    I think I just need a basic Nested For Loop code...

    I have a list of in column A, from A1:A537

    and another list in column B, for B1:B50

    I want to add a column that concatenates,

    each item in Column A to B1 (so 537 rows), then again each item in Column A to B2, another 537 rows, etc.. this loop is repeated 50 times, one for each name in column B, 14 for C and so on. Output to column G

    So like this.
    column a 537 rows
    Columbus b 50 rows
    column c 14 rows
    column d 8 rows
    column e 5 rows
    column f 3 rows

    output all possible combinations = 45108000

    how can I do this? will give 40 points
    Last edited by jcpreta; 06-27-2015 at 11:46 AM. Reason: quick reponse

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: nested loop with concatenation with many columns

    45 million rows of result... Yes its possible.

    Where do you want the last output to be put?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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. Nested loop to concatenate 2 columns of data
    By JohnnyBGood in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-15-2015, 07:42 AM
  2. [SOLVED] Concatenation with nested IF
    By Michael D in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-15-2013, 10:07 AM
  3. [SOLVED] Nested loop to match cell text for two columns in different sheets
    By lottidotti in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2012, 10:48 AM
  4. Next without For error in nested loop - Escaping a Nested Loop?
    By BeneRich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2012, 06:38 PM
  5. For each loop nested; getting stuck on one cell in first iteration of nested loop
    By Excel_vba in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-22-2009, 11:54 AM

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