+ Reply to Thread
Results 1 to 8 of 8

How to create a list of values with a criteria in a one cell using formula?

  1. #1
    Registered User
    Join Date
    04-14-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    97

    How to create a list of values with a criteria in a one cell using formula?

    Hi Everyone!

    I am trying to work out the issue as below

    I have in my
    Columm A5:A3000 Column B5:B3000

    Document Number Submittal Number
    AA-544472-1 TR-0245
    AB-611123-2 TR-0245
    AB-321150-1 TR-0245

    After typing in TR-0245 in Cell A1 in my other workbook (Transmittal), I need a result as below

    Document Nos.
    AA-544472-1
    AB-611123-2
    AB-321150-1

    NOTE: That the Document Nos are in different Rows.

    Appreciate in any help.

    Thanks in advance,
    Rev12

  2. #2
    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,036

    Re: How to create a list of values with a criteria in a one cell using formula?

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please don't attach a picture of an Excel sheet (no-one will want to re-type all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually).

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    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

  3. #3
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: How to create a list of values with a criteria in a one cell using formula?

    Put this where you want the first result:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Change each instance of 'Source data'! to match the name of your source file and sheet.

    Important: this is an array formula so needs to be entered using Ctrl-Shift-Enter not just Enter. You will know the array is active when you see curly brackets { } appear around your formula - don't try to enter them yourself. If you do not Ctrl-Shift-Enter you will get an error or a clearly incorrect result. If that happens, just click into the formula bar and try again.

    Now drag the formula down until you start getting errors. You could surround the formula with an error-check if you want:
    =IFERROR(formula above,"no more results")

    Hope that does what you want.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  4. #4
    Registered User
    Join Date
    04-14-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: How to create a list of values with a criteria in a one cell using formula?

    I have attached a sample of my excel sheets where in 2nd worksheets (Transmittal) list my results.

    Thanks in advanve
    Attached Files Attached Files

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: How to create a list of values with a criteria in a one cell using formula?

    Please try at Transmittal A6 and copy down

    =IFERROR(INDEX(MasterList!A:A,AGGREGATE(15,6,ROW(MasterList!$B$5:$B$3000)/(MasterList!$B$5:$B$3000=$A$1),ROWS(A$6:A6))),"")

    or with Ctrl+Shift+Enter

    =IFERROR(INDEX(MasterList!A:A,SMALL(IF(MasterList!$B$5:$B$3000=$A$1,ROW(MasterList!$B$5:$B$3000)),ROWS(A$6:A6))),"")

  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,036

    Re: How to create a list of values with a criteria in a one cell using formula?

    In A6:

    =IFERROR(INDEX(MasterList!A:A,AGGREGATE(15,6,ROW(MasterList!$B$6:$B$14)/(MasterList!$B$6:$B$14=$A$1),ROWS(A$6:A6))),"")

    copied down.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-14-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: How to create a list of values with a criteria in a one cell using formula?

    Thanks for the great idea now I have figure out my results.

    thansk again everyone...



    Aardigspook

    Bo_Ry

    Glenn Kennedy

  8. #8
    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,036

    Re: How to create a list of values with a criteria in a one cell using formula?

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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] Formula to create a list based on criteria
    By callummcgrath in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 09-01-2017, 05:33 AM
  2. Replies: 2
    Last Post: 01-03-2017, 08:40 AM
  3. [SOLVED] Create unique list of values from two ranges with criteria
    By ThirtyTwo in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 06-13-2014, 10:46 AM
  4. Replies: 4
    Last Post: 01-12-2014, 11:52 PM
  5. Create a Drop Down list if another cell meets certain criteria
    By rini11 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-18-2013, 03:18 AM
  6. Replies: 2
    Last Post: 02-13-2012, 08:22 AM
  7. Replies: 8
    Last Post: 12-30-2008, 12:06 PM

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