+ Reply to Thread
Results 1 to 11 of 11

Combine info from Multiple columns into single one

  1. #1
    Registered User
    Join Date
    04-26-2017
    Location
    Milan
    MS-Off Ver
    Office 2013
    Posts
    47

    Combine info from Multiple columns into single one

    Hi,
    I am writing since I have a problem I do not know how to approach.
    I have attached the file with the examples so let me explain what I need to do:
    in sheet "data" I have a list of style codes and from column C to N I have some style features. the header defines the feature name and TRUE/FALSE define if the style has that feature or not.
    on sheet "config list" I have the transcoding of the feature name to feature code which is system relevant.
    in sheet "expected result" is what I am looking forward: basically for every style code I would need to identify the "TRUE" features and list all of them in a single cell(feature codes), with values separated by a comma. if no value is TRUE than the cell should remain blank.
    I've tried to approach it with lookups and index functions but for some reason I cannot find a single nested function or macro to help me
    is there a way to do so?
    thanks in advance for the help!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Combine info from Multiple columns into single one

    Try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-26-2017
    Location
    Milan
    MS-Off Ver
    Office 2013
    Posts
    47

    Re: Combine info from Multiple columns into single one

    hi @jindon
    that is exactly what i needed but instead of creating a new sheet everytime the macro is run would it be possible to have it run on a specific sheet(Expected result) and in specific column, in this case B?this because there could also be other information and i would need this to be on the same sheet. thanks again!

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Combine info from Multiple columns into single one

    Then try change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-26-2017
    Location
    Milan
    MS-Off Ver
    Office 2013
    Posts
    47

    Re: Combine info from Multiple columns into single one

    it works now but i noticed something related to the fact i added some columns that were not there and probably shifted everything. i'm usual able to read the VBA language but not in this case. if i run the macro i get a type mismatch error related to this part of the macro "If a(i, ii) Then"
    i attached the file i amended
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Combine info from Multiple columns into single one

    Please Login or Register  to view this content.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  7. #7
    Registered User
    Join Date
    04-26-2017
    Location
    Milan
    MS-Off Ver
    Office 2013
    Posts
    47

    Re: Combine info from Multiple columns into single one

    actually not, i though the macro could easily be moved to the actual file where i need it which is the one i attached.
    so, in the new file the sheets "config list" and "data" remain and the sheet "expected result" is replaced by "import_data"
    this is where it becomes complicated for me: in sheet "data" the style code is in column C and is 6 chars long while in sheet "import_data" the check should be done against the code in column A(the list could be longer or shorter but it is never as long as the one in sheet "Data", taking into account only the first 6 chars and results, so the technologies codes should be put in column AS
    sorry if i am basically to start from scratch but i am usually able to update the functions based on the actual needs
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Combine info from Multiple columns into single one

    How many times are you going to change the files???

  9. #9
    Registered User
    Join Date
    04-26-2017
    Location
    Milan
    MS-Off Ver
    Office 2013
    Posts
    47

    Re: Combine info from Multiple columns into single one

    you are right, i should have posted the final one but it was bigger so made a similar version of it hoping i could then adapt it to mine. the last one attached is the current version i am using. sorry for this misunderstanding, totally my fault

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Combine info from Multiple columns into single one

    1) When you ask question and give a sample workbook, it MUST have identical data layouts to your actual file.
    2) If "Import_Data" is your desired result, I don't understand what you are trying to do.
    3) If the last question is not related to your original question, you will need to open a new thread for that.

  11. #11
    Registered User
    Join Date
    04-26-2017
    Location
    Milan
    MS-Off Ver
    Office 2013
    Posts
    47

    Re: Combine info from Multiple columns into single one

    sorry again for that, i will open a new thread to post the correct request

+ 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. [SOLVED] How to combine data from multiple rows into a single row / multiple columns
    By Iain170 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-17-2020, 06:56 AM
  2. [SOLVED] Combine data from multiple columns to single column (Format changes)
    By taralmehta15 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-17-2018, 10:36 AM
  3. Replies: 1
    Last Post: 04-05-2016, 01:13 PM
  4. Replies: 5
    Last Post: 07-31-2015, 01:53 PM
  5. Replies: 6
    Last Post: 02-19-2014, 10:25 AM
  6. Replies: 3
    Last Post: 09-03-2013, 11:53 AM
  7. Excel 2007 : Combine multiple columns into a single one
    By daitrangle2308 in forum Excel General
    Replies: 0
    Last Post: 04-19-2012, 06:49 AM

Tags for this Thread

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