+ Reply to Thread
Results 1 to 24 of 24

Extract values with the help of two criteria

  1. #1
    Forum Contributor
    Join Date
    11-24-2019
    Location
    India
    MS-Off Ver
    Ms. Office 2016
    Posts
    169

    Exclamation Extract values with the help of two criteria

    Hello,

    In the sheet of Basic Data, data entered is given. Data is sample data and actual data will be in thousand rows.
    Second sheet is expected result sheet. In this sheet 'Expected Result', column Batch No should be derived from the 'Basic Data' Sheet considering two criteria i.e. Name of the Subject and Name of the Employee. It means e.g. D8 value will derived from the Basic sheet data as per B8 and C8 criteria. Also if numbers in the original extracted data is scattered then data will arrange in ascending order separated by ". "

    In Total Batches No column, all the batches will reflect in Total Batches No column with ascending order. Two batches will separated by ". "

    In total count of batches given in Total Batches No will reflect.

    I need formula for the above task.
    Your help will be useful.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Extract values with the help of two criteria

    Exactly te same question has been asked before on the forum ... but no idea how to find it!.

    Maybe the respondent(s) can recall it!

    UPDATE: it was asked by you !!

    https://www.excelforum.com/excel-pro...her-sheet.html

    .
    Last edited by JohnTopley; 06-22-2022 at 03:07 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    11-24-2019
    Location
    India
    MS-Off Ver
    Ms. Office 2016
    Posts
    169

    Re: Extract values with the help of two criteria

    That solution was for another work in vba form which is not working now for this task and also difficult to understand hence modify.

    Formula solution is needed can be used in future for different tasks.

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

    Re: Extract values with the help of two criteria

    Do you want in expected results sheet, all subjects and its employees, batches... are listed automatically one after one?
    For example:
    Finance
    MrA
    MrB
    Marketting
    MrC
    MrD
    ...

    I afraid its very hard for formula based solution.
    Quang PT

  5. #5
    Forum Contributor
    Join Date
    11-24-2019
    Location
    India
    MS-Off Ver
    Ms. Office 2016
    Posts
    169

    Re: Extract values with the help of two criteria

    Yes I want that as per given format.
    But at least if I come to know about one subject, employee and its related remaining column, I will try to modify for others.

    If it is possible to do all then it will be wonderful

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Extract values with the help of two criteria

    The "basic Data" is the same as your previous post but there are 2 additions to the "Output": "Allocation of blocks" and "balance no. of blocks",

    There is no explanation if/how these are derived

    Plus you consolidated the "Toal Batch numbers" per department into a merged cell (which should be avoided).

    You may still be looking at a VBA solution so awareness of the original post would have been helpful to avoid re-inventing the wheel.

  7. #7
    Forum Contributor
    Join Date
    11-24-2019
    Location
    India
    MS-Off Ver
    Ms. Office 2016
    Posts
    169

    Re: Extract values with the help of two criteria

    I am trying handle it through formula. If it is difficult to do all then only formula for D8 cell will be helpful. Remaining values and formula i will alter as per need.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Extract values with the help of two criteria

    Modification of Jindon's initial code in your previous post.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JohnTopley; 06-22-2022 at 02:36 PM.

  9. #9
    Forum Contributor
    Join Date
    11-24-2019
    Location
    India
    MS-Off Ver
    Ms. Office 2016
    Posts
    169

    Re: Extract values with the help of two criteria

    Thanks. I tried this code. But it is giving 'Type Mismatch' error.

  10. #10
    Forum Contributor
    Join Date
    11-24-2019
    Location
    India
    MS-Off Ver
    Ms. Office 2016
    Posts
    169

    Re: Extract values with the help of two criteria

    Is it possible to give only a formula for D8 cell?

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Extract values with the help of two criteria

    I don't know how D8 can be derived using formula: with great difficulty I suspect, not least as you require it sorted. With 365 it could be possibly be done. Beyond my pay scale

    Re "Mismatch error": Mea Culpa! I removed the Date column from "Basic Data" to get the code to work as the earlier posts so I could reuse Jindo's code.

    I will look at modifying the code to allow for added "Date" column.

  12. #12
    Forum Contributor
    Join Date
    11-24-2019
    Location
    India
    MS-Off Ver
    Ms. Office 2016
    Posts
    169

    Re: Extract values with the help of two criteria

    Okk, thanks

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Extract values with the help of two criteria

    Have you udpated to MS365?
    Last edited by AliGW; 06-25-2022 at 02:31 AM. Reason: Typo fixed.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  14. #14
    Forum Contributor
    Join Date
    11-24-2019
    Location
    India
    MS-Off Ver
    Ms. Office 2016
    Posts
    169

    Re: Extract values with the help of two criteria

    I have just office 2016 and no other subscription.

  15. #15
    Forum Contributor
    Join Date
    11-24-2019
    Location
    India
    MS-Off Ver
    Ms. Office 2016
    Posts
    169

    Re: Extract values with the help of two criteria

    Hello Any solution?

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Extract values with the help of two criteria

    147 views and no further offers of help - it would appear not, sorry.

  17. #17
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Extract values with the help of two criteria

    What real "value add" is there in reformatting rather than simply sorting the "Basic Data" by "Department" then "Employee" ?

    Surveys indicate up to 80% of time spent on Excel is simply for transforming data (and I suspect much of this is non-productive!)

  18. #18
    Forum Contributor
    Join Date
    11-24-2019
    Location
    India
    MS-Off Ver
    Ms. Office 2016
    Posts
    169

    Re: Extract values with the help of two criteria

    Whatever is non productive from your point will be used with some modifications and can be productive in actual work.

  19. #19
    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,139

    Re: Extract values with the help of two criteria

    You are expecting FAR too much from a formula. Splitting stop-separated data, merging, sorting and adding stops back in is diffcult enough with O365. It's pretty much impossible here. You might manage wth lots of helper columns, but it would still be hugely messy. Best option is VBA, I suspect (not my strong point, though).
    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

  20. #20
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,337

    Re: Extract values with the help of two criteria

    @Glenn: A VBA solution was provide initially by Jindon in a previous post plus modification by me (of Jindon's code) to meet the request in this post.

    So no idea what more the OP wants!

  21. #21
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Extract values with the help of two criteria

    The OP wants a formula solution that he just isn't going to get. Probably ...

  22. #22
    Forum Contributor
    Join Date
    11-24-2019
    Location
    India
    MS-Off Ver
    Ms. Office 2016
    Posts
    169

    Re: Extract values with the help of two criteria

    @AliGW: yes absolutely right. i need formula

  23. #23
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Extract values with the help of two criteria

    Please read post #19.

  24. #24
    Forum Contributor
    Join Date
    11-24-2019
    Location
    India
    MS-Off Ver
    Ms. Office 2016
    Posts
    169

    Re: Extract values with the help of two criteria

    Yea agree. Thanks.

+ 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] Extract values with criteria then sort them
    By Villalobos in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-25-2020, 05:24 AM
  2. [SOLVED] if series criteria ,extract values
    By loucifer777 in forum Excel General
    Replies: 9
    Last Post: 04-08-2020, 01:44 PM
  3. [SOLVED] Extract values based one criteria
    By bjnockle in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-10-2016, 10:47 AM
  4. [SOLVED] Extract values based on two (2) criteria
    By bjnockle in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-07-2015, 04:58 PM
  5. [SOLVED] Extract values based on three (3) criteria
    By bjnockle in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 08-23-2015, 02:30 PM
  6. Extract values based on two (2) criteria
    By bjnockle in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 07-19-2015, 04:14 AM
  7. [SOLVED] Extract values based on two (2) criteria
    By bjnockle in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-18-2015, 05:10 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