+ Reply to Thread
Results 1 to 8 of 8

distributing/concatenating values from multiple columns

  1. #1
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    distributing/concatenating values from multiple columns

    distribute/concatenate values from 4 columns ..

    e.g. from attachment

    ef.xlsx
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: distributing/concatenating values from multiple columns

    seems to be no logic to that ,where does hr come from?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,412

    Re: distributing/concatenating values from multiple columns

    Not sure where HR comes from in G13 onwards - should it be FH ?

    Not sure where the 11 in G18 comes from - should that be 12 (from D3), and other numbers follow ?

    Why does HR (FH ?) carry on in G18 and not reset back to XY?

    Where does 12 in the middle of G18 come from - should that be 22 (from B4) ?

    Pete

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: distributing/concatenating values from multiple columns

    ahh yes my mistake..Thanks both.
    here's a better sample .
    ef.xlsx

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: distributing/concatenating values from multiple columns

    AA 22 XY 12 <- should be 22

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,412

    Re: distributing/concatenating values from multiple columns

    In the attached I have kept the individual columns (K to N) as well the concatenated result (column I), though you don't need both.

    I've also kept it fairly generic, so you can have any number of entries in cells A3:D10 and it will respond to them (though you might need to copy the formulae down further). Here's the monster formula that produces the concatenated result:

    =INDEX(A$3:A$10,MOD(INT((ROWS($1:1)-1)/COUNTA(D$3:D$10)/COUNTA(C$3:C$10)/COUNTA(B$3:B$10)),COUNTA(A$3:A$10))+1)&" "&INDEX(B$3:B$10,MOD(INT((ROWS($1:1)-1)/COUNTA(D$3:D$10)/COUNTA(C$3:C$10)),COUNTA(B$3:B$10))+1)&" "&INDEX(C$3:C$10,MOD(INT((ROWS($1:1)-1)/COUNTA(D$3:D$10)),COUNTA(C$3:C$10))+1)&" "&INDEX(D$3:D$10,MOD(ROWS($1:1)-1,COUNTA(D$3:D$10))+1)

    Hope this helps.

    Pete
    Attached Files Attached Files

  7. #7
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: distributing/concatenating values from multiple columns

    Thanks working perfectly.
    Can't think solutions for this very dizzy today.
    Problem in EF. slowing down on me.

    Thanks again.

    Regards,
    Vladimir

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,412

    Re: distributing/concatenating values from multiple columns

    You're welcome - glad to help.

    If you don't need the flexibility built in, you can change those COUNTA functions to the actual number of cells used in each column and shorten the formula considerably.

    Pete

+ 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. Distributing values from existing column to two new columns
    By burman.p in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-04-2013, 02:57 PM
  2. Merging/Concatenating Multiple Columns
    By kopite2002 in forum Excel General
    Replies: 2
    Last Post: 10-13-2010, 06:48 AM
  3. Distributing one column amongst multiple columns.
    By ExcelNoob21222 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2008, 02:26 PM
  4. Concatenating Columns values
    By sarathyvb in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-30-2007, 08:06 PM
  5. Distributing values from rows to columns for Access import
    By Petterq in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-10-2005, 05:05 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