+ Reply to Thread
Results 1 to 3 of 3

list parts of a row that contain certain information!

  1. #1
    Registered User
    Join Date
    08-10-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    16

    Unhappy list parts of a row that contain certain information!

    Hello,

    I apologize if I sound like a big dummy. I need this for work and would really appreciate some help. I have a list of names and a list of programs in the column next to it.

    In a single box: I need to list all the names associated with a specific program in one box and all the names associated with another program in another box, and so on. So let's say I have 1,000 names in column A and each name has 1 of 5 different types of programs in column B, what I am trying to do is create a formula where all of the names in Column A that are part of Program 1 are listed in one cell with carriage returns between the names, all the names that are linked to Program 2 in another cell, and the same with program 3.

    For a visual representation, this is what it would look like:
    Name Program
    Danny Program 1
    Sally Program 3
    Jesse Program 2
    Frank Program 5
    Kyle Program 1
    Sophie Program 3
    Aaron Program 2
    Blain Program 4
    Angela Program 3
    Allison Program 5

    So I want to be able to put in a a formula (or code if needed) that will automatically display any name that is on the same row as Program 1 (Danny & Kyle).

    Here is what I have done so far:
    1.) I found a VBA code I copied off the internet that allows me to list items in a range of cells in one cell, then I added CHAR(10) to seperate the names by the line. The code is "CAT"
    2.) I am using the following code: =IF(ISNUMBER(SEARCH("*Program 1*",B1:B1000)),(CAT(A1:A1000, CHAR(10))),"")
    3.) Tried changing it to =IF(COUNTIF(B1:B1000, "Program 1")),(CAT(A1:A1000, CHAR(10))),"")

    Here is my problem: I cannot figure out how to make this a conditional request that will only include names that have "Program 1" in Column B. So, if a name from column A was "Program 2" in column B (like Jesse from above), I don't want that that name to list in the section meant for Program 1 Names.

    Right now, the frustrating part is the names will only display if the first cell from the formula is "Program 1" using ISNUMBER(SEARCH formula and with COUNTIF it will display all the Names in Column A if ANY cell in column B contains "Program 1."

    I do not want to "Sort & Filter" because in actuality there are many programs and I need a quick way to show the names all on one sheet underneath the heading for the programs with different data entered weekly.

    Is this possible? I would be greatly indebted if you can figure this out for me!!
    Last edited by brolsen; 08-10-2011 at 11:01 PM. Reason: Clarification and example added

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    re: list parts of a row that contain certain information!

    Hello,

    Please don't ask the same question in different threads

    you could build a Pivot Table. Drag the Program into the row labels and the Name underneath the Program. No programming and no formulas involved.

    If that does not suit, please post a workbook and mock up the required result manually. I have trouble picturing what your goal is.

    cheers,

    [Edit: See attachment}
    Attached Files Attached Files
    Last edited by teylyn; 08-10-2011 at 11:35 PM.

  3. #3
    Registered User
    Join Date
    08-10-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    16

    re: list parts of a row that contain certain information!

    Hello Teylyn,

    First off, I apologize for breaking rule #5. To be completely honest I just forgot that I had posted it earlier and when I couldn't find it, I decided to post again.

    Second, Thanks so much for your help. This is very close to what I am looking to do.

    If I can ask your help (or anyone else who knows) this would finish this off for me. Is there anyway to either get a specific part of a pivot table to show in one cell and another in another cell? Or (if not) is there a way to do a macro or something that can take the data from a pivot table with two items under criteria and list the data in one excel cell?

    For privacy purposes I had to delete the "Names" column from the worksheet I am working on. So if you can just pretend that the GPA column (found on "Sheet 2" of the attachment) is a list of names of different people instead of numbers.

    What I am trying to do, is get the data from any one program to display all the names of people who graduated with that program. So, if you look at the excel I attached, it will probably make more sense. Basically I need to figure out how to take a huge database monthly, copy and paste in the values into Sheet 2 (which will always have the same headings at the top). Then I want the first Sheet to have all the names of graduates for that specific program automatically put within the appropriate box.

    After looking at it, could anyone (or you) let me know if this is possible? This would save me loads of time. I have to manually enter in each program from a filter/sort list. Takes forever. I would really appreciate your help again.
    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)

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