+ Reply to Thread
Results 1 to 4 of 4

concatenate based on User input

  1. #1
    Forum Contributor
    Join Date
    03-28-2008
    Location
    India, bangalore
    MS-Off Ver
    Excel 2003,2007
    Posts
    216

    concatenate based on User input

    Hi,

    Wish you all a happy Christmas.

    Need a help with Concatenate which is bit complex

    I have data from Column A to Col Z with more than 1000 rows of data ( in Column AA, I want to concatenate few columns like A2, C2, Y2, Q2 etc.
    If the formula is standard one i would simple put = A2&C2&Y2&Q2 for all rows. The challenge is these concatenates has to be dynamic based on Headers that I put in another sheet.
    Based on the headers keyed in Sheet 2, the concatenate formula in Sheet 1 Col AA should be updated on the same order. like =B2&E2&A2&D2&N2
    ex
    User Input in ( Sheet 2 Col A)
    Header2
    Header5
    Header1
    Header4
    Headers 15
    etc

    Sample file attached & Similar post is here

    https://www.mrexcel.com/board/thread.../#post-5609122
    Attached Files Attached Files

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: concatenate based on User input

    so what's wrong with the ans in the other post? i would bet that you can do this w functions, however I do not use them, nor do I care about them. this is about the only thing I could think of:
    Please Login or Register  to view this content.
    in cell b2 of sheet ''sheet 2'':
    Please Login or Register  to view this content.
    not sure if that will work for you or not.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: concatenate based on User input

    Please try MS365 formula

    =CONCAT(SORTBY(REPT(A2:Z2,ISNUMBER(MATCH($A$1:$Z$1,'Sheet 2'!$A$2:$A$9,))),MATCH($A$1:$Z$1,'Sheet 2'!$A$2:$A$9,)))

    or VBA

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Bo_Ry; 12-23-2020 at 01:30 PM.

  4. #4
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: concatenate based on User input

    Please Login or Register  to view this content.
    Kind regards
    Leo
    Attached Files Attached Files

+ 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: 15
    Last Post: 07-11-2017, 10:55 AM
  2. Data Input Form with number of line items based on user input
    By j_gideon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2013, 02:54 PM
  3. Replies: 4
    Last Post: 02-25-2013, 06:43 PM
  4. user defined macro to replace certain characters in a string based on user input
    By whatappears in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-17-2012, 06:25 PM
  5. Automatic Formula Input Based on User Input Using a Macro
    By Drayloc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-03-2012, 12:10 PM
  6. Using text box input to lookup number and replace based on user input into new column
    By harl3y412 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2011, 03:15 PM
  7. [SOLVED] user input and concatenate
    By Brad in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2005, 04:06 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