+ Reply to Thread
Results 1 to 7 of 7

help with formula to pull data based on a condition in together in another cell

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    help with formula to pull data based on a condition in together in another cell

    Hello, I have a column with dates and another column beside it. I need a formula in cell D25 that would look at column O16:O37 and any cell in that range that has an x or other character would bring the date in the adjacent cell (column P) together separated by a comma. Any help would be greatly appreciated.


    Untitled.jpg
    Last edited by lilsnoop; 01-24-2023 at 10:58 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Re: help with formula to pull data based on a condition in together in another cell

    After some research I found this formula to list the dates via the selected "x"'s in column O:
    Please Login or Register  to view this content.

    I think I'm going to have to use vba to concatenate the list, though I would prefer a formula based solution.

  3. #3
    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,053

    Re: help with formula to pull data based on a condition in together in another cell

    Hi. Before we get going on this one...

    Is your forum profile showing the Excel PRODUCT that you need this request to work with?

    The best solutions often rely on knowing WHICH Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date. If you aren't sure, in Excel go to File/Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this.

    The three most recent Excel PRODUCTS are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the Version number in your profile (e.g. MS365 (PC) Version 2211). The version number is in the About Excel section further down the Account page.

    Cheers,

    Glenn.
    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

  4. #4
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Re: help with formula to pull data based on a condition in together in another cell

    Thanks Glenn! I have Excel 2013 on home computer and Excel 2016 at work, which is what this problem is associated for. My profile has been updated to reflect Excel 2016.

  5. #5
    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,053

    Re: help with formula to pull data based on a condition in together in another cell

    Not quite modern enough!

    Is VBA (a UDF to be exact) OK?

  6. #6
    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,053

    Re: help with formula to pull data based on a condition in together in another cell

    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 use:

    =concatall(IF(I4:I10="x",TEXT(J4:J10,"mm/dd/yyyy"),""),", ")

    You seem to be using an older version of Excel than me. So, please refer to the attached file. If the formulae are enclosed within a pair of { }, these are array formulae.

    These 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 the curly brackets { } 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...
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    Re: help with formula to pull data based on a condition in together in another cell

    Thank you Glenn! Appreciate all your help!

+ 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. Formula (Index?) to pull data from one sheet to another based on cell data
    By kikijean in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-04-2021, 10:00 PM
  2. [SOLVED] If statement in VBA that will pull a cell value based on condition set
    By tranahan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-18-2020, 08:38 AM
  3. [SOLVED] Pull data from other tab based on condition
    By JDobbsy1987 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-15-2017, 07:22 PM
  4. Replies: 2
    Last Post: 12-07-2016, 12:39 PM
  5. Formula to pull data based on cell value
    By rp1783 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-14-2015, 09:59 PM
  6. Replies: 1
    Last Post: 01-20-2014, 03:52 AM
  7. Formula to pull rows of data based on a column cell value (Criteria)
    By PaulLor89 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-30-2013, 11:26 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