+ Reply to Thread
Results 1 to 6 of 6

2 columns, take A1 and B1, A1 and B2, A1 and B3....then....A2 and B1, A2 and B2, A2 and B3

  1. #1
    Registered User
    Join Date
    10-11-2004
    Posts
    8

    2 columns, take A1 and B1, A1 and B2, A1 and B3....then....A2 and B1, A2 and B2, A2 and B3

    Hi,

    I have 2 columns, as follows:

    A1: apples
    A2: pears
    A3: oranges
    A4: bananas
    A5: grapes

    B1: 1
    B2: 2
    B3: 3


    I need in column C: the following:

    C1: apples 1
    C2: apples 2
    C3: apples 3
    C4: pears 1
    C5: pears 2
    C6: pears 3
    C7: oranges 1
    C8: oranges 2
    C9: oranges 3
    C10: bananas 1
    C11: bananas 2
    C12: bananas 3
    C13: grapes 1
    C14: grapes 2
    C15: grapes 3

    Very appreciative to any help on the best way to achieve this.

    Best Rgds

    Marcus

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: 2 columns, take A1 and B1, A1 and B2, A1 and B3....then....A2 and B1, A2 and B2, A2 an

    What version of Excel does this have to work in?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: 2 columns, take A1 and B1, A1 and B2, A1 and B3....then....A2 and B1, A2 and B2, A2 an

    I need in column C: the following:

    C1: apples 1
    C2: apples 2
    C3: apples 3
    Would it be OK if you did this...

    Data Range
    C
    D
    1
    apples
    1
    2
    apples
    2
    3
    apples
    3
    4
    pears
    1
    5
    pears
    2
    6
    pears
    3
    7
    ------
    ------

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: 2 columns, take A1 and B1, A1 and B2, A1 and B3....then....A2 and B1, A2 and B2, A2 an

    Try

    =INDIRECT("A" & INT((ROW()-1)/COUNT(B:B))+1) & " " & INDIRECT("B" & MOD((ROW()-1),COUNT(B:B))+1)

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: 2 columns, take A1 and B1, A1 and B2, A1 and B3....then....A2 and B1, A2 and B2, A2 an

    Try this non volatile version,In C2, then drag down
    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: 2 columns, take A1 and B1, A1 and B2, A1 and B3....then....A2 and B1, A2 and B2, A2 an

    A more "generic" version of kvsrinivasamurthy posting .

    =IFERROR(INDEX($A$1:$A$100,INT((ROWS($C$1:$C1)-1)/COUNT(B:B))+1)&INDEX($B$1:$B$100,MOD(ROWS($C$1:$C1)-1,COUNT(B:B))+1),"")

    better than my INDIRECT version.
    Last edited by JohnTopley; 12-01-2015 at 05:05 AM.

+ 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. Find Duplicates across 2 pairs of columns (2 columns against 2 columns)
    By erjfly2013 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-09-2015, 06:52 PM
  2. Macro to Copy from 2 Columns, Paste Value in the next 2 Columns, Then clear 1st Columns
    By MHALTTUNEN in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2014, 03:34 PM
  3. Macro to Compare two columns and publish sheet name in case columns dont match
    By adaws in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2014, 01:21 PM
  4. [SOLVED] Macros to transpose from multiple columns to selected columns and maintaining cell format
    By rrajnish in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-09-2013, 01:45 PM
  5. Combining multiple rows from 2 columns into sorted columns depending on 1st columns value
    By Dexamphetamine in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-11-2013, 10:00 AM
  6. MAcro to - copy, transpose, text to columns, remove column A, combine all columns in 1
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 02-07-2013, 08:48 AM
  7. Replies: 6
    Last Post: 12-26-2012, 01:43 PM

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