+ Reply to Thread
Results 1 to 9 of 9

Extract Duplicate and Column header in same row

  1. #1
    Registered User
    Join Date
    02-20-2018
    Location
    london
    MS-Off Ver
    excel 2010
    Posts
    14

    Exclamation Extract Duplicate and Column header in same row

    Hi,

    Really would like some help here.

    I have several different dates in a row with one primary date i need to match with.

    The different dates referring to different events and stages. I would like to extract all the column header which has the event if the main date matches in the same row.

    for Example
    Column Headers First Stage Second Stage Third Stage Fourth Stage
    Row 1 : Main Date: 01/01/2018 | 01/01/2018 | 02/01/2018 | 01/01/2018 | 01/01/2018

    I'd like to extract and list the stages providing the Main date is the same as the cell in that row

    Desperately would like some advice thanks. hope it makes sense.

    thanks
    Attached Files Attached Files
    Last edited by jexcel123; 03-15-2018 at 02:08 PM.

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Extract Duplicate and Column header in same row

    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 then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Extract Duplicate and Column header in same row

    Rule 08: Cross-posting Without Telling Us

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    No further help to be offered, please, until the OP has complied with this request.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    02-20-2018
    Location
    london
    MS-Off Ver
    excel 2010
    Posts
    14

    Re: Extract Duplicate and Column header in same row

    hi i cant post my link as i need to post a few times.

  5. #5
    Registered User
    Join Date
    02-20-2018
    Location
    london
    MS-Off Ver
    excel 2010
    Posts
    14

    Re: Extract Duplicate and Column header in same row

    hi, i am unable to post the link of my other thread/post which is on another forum, can a moderator please do this for me so that others to no waste their time, i can not post it!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: Extract Duplicate and Column header in same row

    Read the instructions I gave: you cannot post a link as you have too few posts. Instead, tell us where else you have posted this query. That is all you have to do.

  7. #7
    Registered User
    Join Date
    02-20-2018
    Location
    london
    MS-Off Ver
    excel 2010
    Posts
    14

    Re: Extract Duplicate and Column header in same row

    dear all, this same thread is on Mrexcel forum so please be aware if it still up then it is unsolved. thanks

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,546

    Re: Extract Duplicate and Column header in same row

    This proposed solution employs A LOT of helpers.
    The first group of helpers, columns T:AF, is populated using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The second group of helpers, columns AH:AT, is populated using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Cell B3 references cell AT3.
    Let us know if you have any questions.
    If the solution works for you please mark the thread on BOTH forums as being 'Solved'.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: Extract Duplicate and Column header in same row

    Here's a UDF to do the same thing.

    Please Login or Register  to view this content.
    How to install your new code
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Press Alt+F11 to open the Visual Basic Editor
    Choose Insert > Module
    Edit > Paste the macro into the module that appeared
    Close the VBEditor
    Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)


    Then an array formula, copied down:

    =ConcatAll(IF($E$3:$R$3=B3,$E$1:$R$1,""),", ",TRUE)

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...

    NOTE: The merged cell at E1:F1 has had to go!! They will always get you in the end.... they are the spawn of Satan
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

+ 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] Extract selected column data based on column header info
    By ajay6985 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-09-2017, 02:07 AM
  2. [SOLVED] Extract Data from another Workbook based on Column Header
    By sunjam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2017, 05:57 AM
  3. [SOLVED] Extract first cell in a row, given the column header and data point in that column.
    By pguarino in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-25-2013, 02:27 AM
  4. [SOLVED] Extract the column header given the row header and highest value in a subset of a table
    By pguarino in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-20-2013, 02:05 AM
  5. How to separate a column header and duplicate to every rows of data?
    By kong5091 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-18-2013, 08:55 AM
  6. Replies: 2
    Last Post: 08-09-2012, 09:16 AM
  7. Extract Duplicate Value to last column
    By sep910 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2007, 05:37 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