+ Reply to Thread
Results 1 to 5 of 5

Combine cells to have all possibilities of the combined cells

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    5

    Combine cells to have all possibilities of the combined cells

    I have two columns
    Column A which has letters A, B, C until Z
    Column B which has letters 1, 2, 3 until 9
    I would like a macro to return the combination of every cell in Column A with every cell in column B in column C
    i.e. it should return in Column C, A 1, A 2, A 3 until A 9 and then B 1, B 2 until B 9 until Z 9.
    Thanks for the help.

  2. #2
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Combine cells to have all possibilities of the combined cells

    Hi,

    try this:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-29-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Combine cells to have all possibilities of the combined cells

    Thanks for the above macro.
    However if the above columns varies, sometimes column A can have less/more then 26 and column B can have less/more then 9, where in the code do I change the number of fields in the column.
    Also Column A inst limited to one letter of the alphabet
    and Column B isn't limited to Numbers it could sometimes be text.

    Thanking for the help in advance

  4. #4
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Combine cells to have all possibilities of the combined cells

    This code will look at how many rows there are in columns A and B and act accordingly. If you want to change he 'for' cycles, feel free to do so. The way I use it, it goes from "x to y", so if you want to change the start or the end, change those parts.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    I'm going to sleep now so don't stay up waiting for me to reply.

  5. #5
    Registered User
    Join Date
    10-29-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Combine cells to have all possibilities of the combined cells

    Thank you very much you have saved hours of work for me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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