+ Reply to Thread
Results 1 to 5 of 5

String combining column names. Extract values from these columns.

  1. #1
    Registered User
    Join Date
    05-29-2015
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    27

    String combining column names. Extract values from these columns.

    Hi, I have 40 columns named 001,..., 040. They consist of up to 200 hundred NATURAL numbers. I need to create a macro that will copy values only from certain columns based on the strings I have to process (e.g. 002-040-017-023 or 009-008 or 006 etc.).
    Example:
    Please Login or Register  to view this content.
    Any idea? I was thinking about selecting values based on prefix from a column where I would store all column values (with prefixes representing column names). Then the macro would remove prefixes, blanks, duplicates and sort it out values. I am able to produce everything except for the function selection column values.
    Last edited by 6StringJazzer; 11-03-2015 at 10:08 AM. Reason: added code tags to provide correct spacing for example

  2. #2
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: String combining column names. Extract values from these columns.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: String combining column names. Extract values from these columns.

    Need some clarity on how you plan on identifying the column names that have to be processed. To me it seems like you are going to need to incorporate some sort of listbox. Depending on how you want to display the output a UserForm might work well. Either way as skywriter said; we need more.
    If you are happy with my response please click the * in the lower left of my post.

  4. #4
    Registered User
    Join Date
    05-29-2015
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    27

    Re: String combining column names. Extract values from these columns.

    abc.xlsx

    There should probably be some translator which recognizes columns based on the string. I was thinking about overcoming this with a prefix and then requesting cells where prefix is "string before the first hyphen", ..., "string after the last hyphen".

  5. #5
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: String combining column names. Extract values from these columns.

    Try this:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by skywriter; 11-04-2015 at 06:23 PM.

+ 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: 1
    Last Post: 07-14-2015, 06:46 AM
  2. Trying to extract First and Last Names from a string
    By Philalawyer in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-01-2014, 06:50 PM
  3. Replies: 8
    Last Post: 09-12-2013, 09:17 AM
  4. Replies: 1
    Last Post: 02-14-2013, 02:32 PM
  5. Replies: 5
    Last Post: 11-08-2012, 03:38 PM
  6. How to extract names from a text string?
    By Bandini in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-16-2012, 09:51 AM

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