+ Reply to Thread
Results 1 to 6 of 6

Need Help with Formula R1C1 Loop

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    3

    Question Need Help with Formula R1C1 Loop

    Hello,

    I'm new to this forum and also to VBA. I have a data series in a sheet.
    For example, Column A has rows A1:A5, I want to concatenate the fields in such a way that the result should be as below.

    A1/A2
    A1/A3
    A1/A4
    A1/A5
    A2/A3
    A2/A4
    A2/A5
    A3/A4
    A3/A5
    A4/A5

    then move to the next column in the same sheet.

    Any help would be greatly appreciated.

    Thank you.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need Help with Formula R1C1 Loop

    This little macro will do what you want with column A, however many values you have entered in column A, creating your list of combinations in column M:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-02-2013
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Need Help with Formula R1C1 Loop

    Thank you very much for the code. Just to modify the query, maximum rows in each column skipping the first row is 20. So, I'm looking for the result of column A starting from A20 however the code should execute from A2, as A1 has a unique identifier for this series to identify. Also it should move to Column B once the process in Column A is executed.

    Please suggest.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need Help with Formula R1C1 Loop

    Click GO ADVANCED and use the paperclip icon to post up a workbook with clear sample data and sample results. Show us the whole thing.

  5. #5
    Registered User
    Join Date
    01-02-2013
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Need Help with Formula R1C1 Loop

    Added as requested.
    Attached Files Attached Files

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need Help with Formula R1C1 Loop

    Quote Originally Posted by JBeaucaire View Post
    Click GO ADVANCED and use the paperclip icon to post up a workbook with clear sample data and sample results. Show us the whole thing.
    Almost got it all... no sample results.

+ 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