+ Reply to Thread
Results 1 to 15 of 15

Lookup formula to retrieve data based on specific criteria

  1. #1
    Registered User
    Join Date
    04-16-2011
    Location
    Tallinn
    MS-Off Ver
    Excel 2010
    Posts
    34

    Lookup formula to retrieve data based on specific criteria

    Hi,

    I have two sheets. In the main sheet I will have entries (ID:s) that are categorised differently. I want to divide the workbook to worksheets according to those categories. Each sheet would only need to contain entries (ID:s) for specific category. I have tried between different lookups but cannot land on optimal solution.

    Thanks in advance,
    T
    Attached Files Attached Files
    Last edited by Exceltrouble; 07-08-2016 at 03:22 AM.

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Lookup formula to retrieve data based on specific criteria

    Try

    B2=IFERROR(INDEX(Main!$A$2:$A$8,AGGREGATE(15,6,ROW(Main!$A$2:$A$8)-1/(Main!$B$2:$B$8=RIGHT(MID(CELL("filename",B1),SEARCH("]",CELL("filename",B1))+1, SEARCH("]",CELL("filename",B1))-SEARCH("[",CELL("filename",B1))-1),1)),ROWS($B$2:B2))),"")

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Registered User
    Join Date
    04-16-2011
    Location
    Tallinn
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Lookup formula to retrieve data based on specific criteria

    That is one long formula, thanks! I tried to set it up in the file but no result. Did I make a mistake in typing it in?
    Attached Files Attached Files

  4. #4
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Lookup formula to retrieve data based on specific criteria

    See the attachment.............
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-16-2011
    Location
    Tallinn
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Lookup formula to retrieve data based on specific criteria

    Thanks a bunch! For some reason I thought that "filename" takes replacing. Solved, thanks again!

  6. #6
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Lookup formula to retrieve data based on specific criteria

    Thanks for feedback please add reputation by clicking star * icon left corner on your thread screen..

  7. #7
    Registered User
    Join Date
    04-16-2011
    Location
    Tallinn
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Lookup formula to retrieve data based on specific criteria

    When I try to replicate the solution in my own file for some reason it does not produce the desired result. I manage to enter the formula without errors but it does not display the values, it seems that when I change the values for "ID" and "Option" in the main sheet, the formula stops working. I fail to modify the formula so that it would actually work also with different values.

    Thanks in advance,
    T

  8. #8
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Lookup formula to retrieve data based on specific criteria

    Can you upload your actual file with expected result here.

    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.

  9. #9
    Registered User
    Join Date
    04-16-2011
    Location
    Tallinn
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Lookup formula to retrieve data based on specific criteria

    I have uploaded now original workbook, hopefully it explains what I want to achieve.

    Thanks in advance,
    Tanel
    Attached Files Attached Files

  10. #10
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Lookup formula to retrieve data based on specific criteria

    Try in sheet Recurring Monitoring Plan

    E4=IFERROR(INDEX('High level Activity Plan'!$E$4:$E$2500,AGGREGATE(15,6,ROW($E$4:$E$2500)-ROW($E$4)+1/('High level Activity Plan'!$F$4:$F$2500=TRIM(SUBSTITUTE(MID(CELL("filename",$B$1),SEARCH("]",CELL("filename",$B$1))+1,LEN(CELL("filename",$B$1))-SEARCH("]",CELL("filename",$B$1))),"Plan",""))),ROWS($E$4:E4))),"")

    E4
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Quote Originally Posted by Exceltrouble View Post
    I have uploaded now original workbook, hopefully it explains what I want to achieve.

    Thanks in advance,
    Tanel

  11. #11
    Registered User
    Join Date
    04-16-2011
    Location
    Tallinn
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Lookup formula to retrieve data based on specific criteria

    Thanks, it does not work for the last sheet advice_support_inform. Works flawlessly for recurring monitoring, non-recurring, and training. Does it take some modification for the last sheet, I still fail to understand the construct of the formula to do it myself

  12. #12
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Lookup formula to retrieve data based on specific criteria

    It is just because your drop down values are not according your sheet name in your background sheet just change last value with Advice_Support_Inform and it will work.............



    Quote Originally Posted by Exceltrouble View Post
    Thanks, it does not work for the last sheet advice_support_inform. Works flawlessly for recurring monitoring, non-recurring, and training. Does it take some modification for the last sheet, I still fail to understand the construct of the formula to do it myself

  13. #13
    Registered User
    Join Date
    04-16-2011
    Location
    Tallinn
    MS-Off Ver
    Excel 2010
    Posts
    34
    Quote Originally Posted by shukla.ankur281190 View Post
    It is just because your drop down values are not according your sheet name in your background sheet just change last value with Advice_Support_Inform and it will work.............
    Brilliant, thanks a lot.

  14. #14
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Lookup formula to retrieve data based on specific criteria

    Glad to help you please mark thread as solved and please add reputation by clicking star * icon left corner on your screen which post helps you and happy to help you keep learning

  15. #15
    Registered User
    Join Date
    04-16-2011
    Location
    Tallinn
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Lookup formula to retrieve data based on specific criteria

    This reputation thing does not work for some reason, it says that I should spread it around before giving it to you. I wonder why should I spread it to someone else who has not helped me... Anyway, thanks again, you helped me with crucial part in automating my workbook.

+ 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. Replies: 0
    Last Post: 05-02-2016, 07:59 AM
  2. [SOLVED] Formula to retrieve specific data if certain conditions are fulfilled
    By joel.mugabe in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-25-2016, 04:52 AM
  3. [SOLVED] Formula to find the sum of a set of data based on specific criteria
    By SciGuy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-21-2014, 07:21 AM
  4. [SOLVED] Retrieve data from a cell based on date criteria in another
    By ajob in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-23-2014, 08:49 AM
  5. Formula to lookup data based on 2 criteria
    By rthomas in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-07-2012, 01:16 AM
  6. [SOLVED] Lookup Specific Value based on the Criteria
    By ggilzow in forum Excel General
    Replies: 2
    Last Post: 06-08-2012, 10:08 AM
  7. retrieve a specific row of data after criteria selection?
    By paulinexiaoli in forum Excel General
    Replies: 4
    Last Post: 06-28-2010, 08:41 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