+ Reply to Thread
Results 1 to 5 of 5

Look-up specific text and return a list of the satisfied text

  1. #1
    Registered User
    Join Date
    03-04-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    4

    Look-up specific text and return a list of the satisfied text

    Hello,

    I am new here, so please forgive me if this post is not what you are used to seeing.

    Here is my problem:

    In Sheet 1, I have a list of 200 road names and their corresponding maintenance scheduled for that year. Sheet 1, A1 has the text "Road Names". And the names of each road are from A2 to A201. Sheet 1, B1 has the text "Maintenance Type". And the type of maintenance is listed in each cell from B2 to B201. These types are as follows: CF, CS, SS, PO, D or "-" if there is no maintenance required.

    What I am trying to do is summarize this data on another sheet.

    I have Sheet 2 with a separate column for each maintenance type, CF (in Sheet 2 A1), CS (in Sheet 2 B1), SS (in Sheet 2 C1), PO (in Sheet 2 D1), D (in Sheet 2 E1)
    Currently what I have done for example, under the CF column in Sheet 2, in cell A2 is enter the following formula:
    =IF(Sheet 1!$B2="CF",Sheet 1!$A2,"-")

    I have copied this formula down to A201, therefore it has returned the road name in that column for any road that has the maintenance type of "CF" and put a "-" in the cells that do not. This is all fine, but what I want to try and accomplish is eliminate all the "-" and just have a summary or list.

    Where I can have a column in Sheet 2 of "CF" and under this column, only the road names that are have a "CF" next to them in Sheet 1 will be displayed.

    For example, let's say there are 18 roads that have a CF, A1 of Sheet 2 would have "CF" and A2 to A19 of Sheet 2 would list the road names that have a "CF" next to them from Sheet 1.

    I hope that isn't too confusing.

    Anyone have any idea if this is possible, or a function/formula that could make that work?

    I have attached an example of what I'm working on. Sheet 3 has what I am looking for. I manually typed that up, but am trying to determine if there is a formula/function that can automatically do that.

    Thanks much for your help.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    09-27-2012
    Location
    Florida
    MS-Off Ver
    Excel XP to 2013
    Posts
    342

    Re: Look-up specific text and return a list of the satisfied text

    Have you tried converting the data on sheet 1 to a table and use the filter feature to obtain your lists for each maintenance type?

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Look-up specific text and return a list of the satisfied text

    Have you considered doing this with a pivot table?
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Look-up specific text and return a list of the satisfied text

    First, Place the cursor at any cell of A column (i.e A1), press Ctrl-F3 (defined name)
    Name: Data
    Refer to:
    Please Login or Register  to view this content.
    Type in A2:
    Please Login or Register  to view this content.
    Confirm with holding Ctrl-Shift, then hit Enter.
    Fill down and accross.
    Attached Files Attached Files
    Quang PT

  5. #5
    Registered User
    Join Date
    03-04-2013
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Look-up specific text and return a list of the satisfied text

    Wow, Thanks bebo021999! That is exactly what I was looking for. It took me some time to figure out how to incorporate that into my actual "working" spreadsheet, but I figured it out using your instructions.

    Thanks again.

    Amazing what Excel can do.

+ 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