+ Reply to Thread
Results 1 to 4 of 4

Thread: Cross join

  1. #1
    Registered User
    Join Date
    01-28-2010
    Location
    Zagreb
    MS-Off Ver
    Excel 2007
    Posts
    2

    Cross join

    I have columns and rows like this:

    3004 05 AA I0108 XXX HRK J, V 01

    What I would like to do is create two rows and each row with value J and V, to look like this:

    3004 05 AA I0108 XXX HRK J 01
    3004 05 AA I0108 XXX HRK V 01

    Is there a way to do this? Some sort of cross join? I have like 1500 rows with this kind of values.

  2. #2
    Forum Guru contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2010
    Posts
    1,335

    Re: Cross join

    can u pls uploadd workbook....?
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, «Born in USSR»
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    5,826

    Re: Cross join

    Hi and welcome to the forum.

    Code:
    B1:
    =LEFT(A1,SEARCH(",",A1)-1)&" "&RIGHT(A1,LEN(A1)-SEARCH("!",SUBSTITUTE(A1," ","!",8)))
    
    C1:
    =LEFT(A1,SEARCH("!",SUBSTITUTE(A1," ","!",6)))&MID(A1,SEARCH("!",SUBSTITUTE(A1," ","!",7))+1,1)&" "&RIGHT(A1,LEN(A1)-SEARCH("!",SUBSTITUTE(A1," ","!",8)))
    Copy B1:C1 down, convert all to values with Copy Paste Special Values and then copy the C column underneath the B column values and sort on column B.

    HTH
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

  4. #4
    Registered User
    Join Date
    01-28-2010
    Location
    Zagreb
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Cross join

    I'm not so good in excel, so, where should i put this function so it reference to all 1500 rows that i have?

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.2.0