+ Reply to Thread
Results 1 to 9 of 9

with the combination of two selections get all the values pertaining to them in excel

  1. #1
    Registered User
    Join Date
    03-28-2014
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    66

    with the combination of two selections get all the values pertaining to them in excel

    Excel 2016 :
    "PartData" sheet stores data and data is fetched from here. Print Report is the sheet where I select Emp No & Set No and get the data automatically in A23 to F28.
    When I select Emp no & Set No (A3 & B3) , it automatically fetches Previous Set No. (in D22) & Count of Lines (in F22 - number of lines the combination of emp no & set have) from the PartData Sheet.

    I need help on the followings : With the combination of Emp no (A4 ) and Previous Set No.( D22) and I want to get values of
    Previous Items (the data will come from PartData: Column D:D),
    Previous items Make (the data will come from PartData: Column J:J),
    Previous Expense (the data will come from PartData: Column H:H)

    A sample file (Trial.xls) is attached for your kind perusal. Please help me.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: with the combination of two selections get all the values pertaining to them in excel

    Hi,
    so what would be the previous item / set / make / expense in your example?

  3. #3
    Registered User
    Join Date
    03-28-2014
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    66

    Re: with the combination of two selections get all the values pertaining to them in excel

    example:
    a) if you select empNo: 20334 and set no:2, I am expecting the details of set no 1 (column Q:Q) pertaining to empno: 20334 (from column G, J, H from Partdata sheet to appear in A24: D28 of Print Report sheet)
    b)if you select empNo: 20336 and set no: 4, I am expecting the details of set no 3(column Q:Q) pertaining to empno: 20336 (from column G, J, H from Partdata sheet to appear in A24: D28 of Print Report sheet)
    Kindly refer the attachment in the original post .

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: with the combination of two selections get all the values pertaining to them in excel

    Hi,
    Try this in A24:
    Please Login or Register  to view this content.
    In C24:
    Please Login or Register  to view this content.
    In D24:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-28-2014
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    66

    Re: with the combination of two selections get all the values pertaining to them in excel

    Thanks a lot for the help. It works.
    But i did not understand the formula : This area : AGGREGATE(15,6, and ROWS($H$1:J1)... could you kindly explain

  6. #6
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: with the combination of two selections get all the values pertaining to them in excel

    Hi,
    The Aggregate function is structured this way:
    AGGREGATE(function_num, options, array, [k])

    "The AGGREGATE function returns the result of an aggregate calculation like AVERAGE, COUNT, MAX, MIN, etc. A total of 19 operations are available, and the operation to perform is specified as a number
    The second argument, options, controls how AGGREGATE handles errors and values in hidden rows"

    In this specific formula I used the "SMALL" operation that is represented by the number "15" , and in options field I chose #6 which stands for "ignore error values".
    In my array I have constricted the formula to provide only these lines that match 2 conditions:

    1. PartsData!$Q$1:$Q$105='Print Report'!$D$22
    2.PartsData!$D$1:$D$105='Print Report'!$A$4

    The array would result in a bunch of errors where the conditions dont meet, and lines 100, 103 where the conditions do meet.

    The aggregate(15,6 formula would provide the information in the 1st smallest line (line 100), and then the second smallest line (103), and if there were additional lines then so on, the 3rd and the 4th.

    ROWS($H$1:H2) would stand for the X smallest number, in this case - 2nd smallest value in the array.
    If you drag the formula down then it will become ROWS($H$1:H3) that signifies the 3rd smallest ,and so on.

    You can read here more about the aggregate function:
    https://exceljet.net/excel-functions...egate-function

  7. #7
    Registered User
    Join Date
    03-28-2014
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    66

    Re: with the combination of two selections get all the values pertaining to them in excel

    Thanks a lot belinda200 . It is clear to me. Once again thanks a lot for all the helps

  8. #8
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,878

    Re: with the combination of two selections get all the values pertaining to them in excel

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    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.

  9. #9
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: with the combination of two selections get all the values pertaining to them in excel

    You'e welcome tpsdas. Glad it helps.

+ 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] Help Populating a Cell Dependent on Combination of Drop Down List Selections
    By kitkatplaya in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-27-2019, 09:34 AM
  2. [SOLVED] Formula to Extraxt email addresses in Col B pertaining to name in Col A
    By flupsie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-17-2018, 11:01 PM
  3. Count values in a row pertaining to a specific date range column
    By MattStolz in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-23-2015, 03:21 PM
  4. Need more help pertaining to the hotel occupancy worksheet
    By TheVodkaDude in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-06-2013, 02:30 AM
  5. IF Statments pertaining to dates and if it lands on a Saturday or Sunday
    By RanS2011 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-22-2013, 11:30 AM
  6. Macro help pertaining to compare
    By lorenzoscott78 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-03-2013, 06:33 PM
  7. Replies: 3
    Last Post: 02-13-2012, 03:20 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