+ Reply to Thread
Results 1 to 8 of 8

UDF for concatenate predefined number of cells

  1. #1
    Registered User
    Join Date
    06-18-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    8

    UDF for concatenate predefined number of cells

    I tried to made macro for concatenating predefined number of cells, but unsuccessfull

    so I enclosed an example with current manual functions and results

    if in column B is number (its count), i need there to concat the above cell values

    can anyone help?
    Attached Files Attached Files

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: UDF for concatenate predefined number of cells

    UDF code may be:
    Please Login or Register  to view this content.
    and you may use this so in D4:
    =ConcatenateRange(OFFSET(B4,-1,0,-B4))
    This may be copied to other cells.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: UDF for concatenate predefined number of cells

    jessko,

    Try this:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Registered User
    Join Date
    06-18-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    8

    Re: UDF for concatenate predefined number of cells

    Thank you, this solution is good for me.

    You think, it is possible to reorder items? Before it was from bottom to up...

    Quote Originally Posted by Izandol View Post
    UDF code may be:
    Please Login or Register  to view this content.
    and you may use this so in D4:
    =ConcatenateRange(OFFSET(B4,-1,0,-B4))
    This may be copied to other cells.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-18-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    8

    Re: UDF for concatenate predefined number of cells

    Arkadi, thank you!

    do you think, it is possible to start at first to last row?
    Attached Files Attached Files

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: UDF for concatenate predefined number of cells

    jessko,

    Yes it is... your original example had it the other way. Try this new one:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-18-2015
    Location
    Bratislava
    MS-Off Ver
    2013
    Posts
    8

    Re: UDF for concatenate predefined number of cells

    Arkadi, thank you!

  8. #8
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: UDF for concatenate predefined number of cells

    My pleasure!

+ 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. Replies: 6
    Last Post: 11-15-2015, 04:53 PM
  2. Converting number into predefined text
    By Solidsteel in forum Excel General
    Replies: 5
    Last Post: 02-12-2013, 10:36 AM
  3. How to concatenate a variable number of rows/cells based on multiple criteria?
    By jonharadon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-16-2012, 09:22 PM
  4. Replies: 1
    Last Post: 05-03-2012, 10:50 AM
  5. Can I use CONCATENATE with a varying number of cells?
    By djbosworth in forum Excel General
    Replies: 1
    Last Post: 09-22-2009, 07:57 AM
  6. Replies: 3
    Last Post: 10-27-2008, 08:32 AM
  7. Auto Number Columns in predefined steps ?
    By tpir72 in forum Excel General
    Replies: 1
    Last Post: 05-12-2007, 09:30 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