+ Reply to Thread
Results 1 to 33 of 33

Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

  1. #1
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Post Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    I have an excel dataset with three columns:

    Column 1: Parameter-a values (repeating)
    Column 2: Parameter-b values (repeating)
    Column 3: Data values for different parameters corresponding to each unique combination of values in columns 1 and 2.

    I want to extract individual data from the third column based on unique combinations of values from the first two columns, and I want this process to be dynamic, meaning it should work for any dataset with similar structure.

    Please find the attached file where dataset and my answer are explained better way.

    ThanksDataset.jpg

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    I know that this is a small data set, but I (and probably most people) am not going to take the time to create a workbook with your data. Including a sample workbook (see banner at the top of the page) will greatly enhance you chances that somebody will be willing to work your issues. I can do this with a combination of a pivot table and some vb code.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Try. In E4.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 03-17-2024 at 02:35 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,423

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Hi nilaakash , Currently your column C does not appear to be duplicated. Is there a possibility of duplication? Would You accept using EXCEL VBA CODE ?
    Last edited by wk9128; 03-17-2024 at 04:17 AM.

  5. #5
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Post Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Thank you kvsrinivasamurthy for your outstanding code.

    Your code works well for small datasets, but I have a much larger one with 30 parameter columns and 20 data columns (experiment results).

    For each unique combination of parameter values, I have several sets of experimental results (4 to 8) in a single column (column C). I need to calculate summary statistics for these results, depending on the situation.

    Average: I can easily calculate the average using the AVERAGEIFS function dynamically.

    Median and Standard Deviation: I'm struggling to find a dynamic way to calculate these for each unique parameter combination.

    My goal is to efficiently analyze the data in column C. I can't simply get the data vertically because it would cause errors. That's why the original code used a transpose approach.

    Please get the attached file. If possible, could you please provide your input there.

    Nilaakash_1.xlsx

  6. #6
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Hello wk9128, I appreciate your comment. The data in column C is experimental and is less likely to repeat. I prefer to avoid using VBA code since I'm not very familiar with it.

  7. #7
    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,869

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    What's the nature of the REAL data? If it's numeric, why did you show sample data that's text?

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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.

  8. #8
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Hi dflak, thank you for your input. I'm new to Excel and seeking guidance from experienced individuals in this forum. I prefer to avoid using VBA code since I'm not very familiar with it.

  9. #9
    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,869

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Please read and act upon post #7.

  10. #10
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Hello AliGW, my apologies if I've made any mistakes. I'm a new member of this forum and still learning the rules. Initially, I wasn't sure if attaching an Excel file was permitted or not. I aimed to present my dataset clearly without including specific numbers. Nonetheless, I've attached the dataset in an Excel file for reference.

  11. #11
    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,869

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    There is no file attached - please try again.

  12. #12
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Quote Originally Posted by kvsrinivasamurthy View Post
    Try. In E4.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Thank you 🙏

  13. #13
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Quote Originally Posted by AliGW View Post
    There is no file attached - please try again.
    Here it is

    Nilaakash_1.xlsx

  14. #14
    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,869

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    But do you still need assistance? Or is it moot in the light of post #12?

  15. #15
    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,869

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    What are your expected results in N2 and O2 (values)?

  16. #16
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Quote Originally Posted by AliGW View Post
    But do you still need assistance? Or is it moot in the light of post #12?

    Apologies for any confusion. I truly appreciate your assistance. I've attached the file (Nilaakash_1.xlsx) for kvsrinivasamurthy, who provided me with a helpful code. I've requested another solution from them, and if possible, I'd like to incorporate their input into my file. Thank you for your support.

  17. #17
    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,869

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Maybe try:

    =BYROW(H2:K5,LAMBDA(r,AVERAGE(r)))

    =BYROW(H2:K5,LAMBDA(r,MEDIAN(r)))

    =BYROW(H2:K5,LAMBDA(r,STDEV.P(r)))

    for kvsrinivasamurthy, who provided me with a helpful code.
    Anyone can offer help.
    Attached Files Attached Files
    Last edited by AliGW; 03-17-2024 at 06:19 AM. Reason: Workbook updated.

  18. #18
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Thank you sincerely for providing your code. Your dynamic solution is truly appreciated. However, I've encountered an issue with the H column in my own code—it's not dynamic, requiring manual dragging to populate values completely. I'm seeking assistance to make this part of the code dynamic as well. Any help would be greatly valued.
    Last edited by AliGW; 03-17-2024 at 06:32 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

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

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    For this to work properly, KM's formula will need to be tweaked:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by AliGW; 03-17-2024 at 06:34 AM. Reason: Workbook added.

  20. #20
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,293

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Power Query
    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    However, I've encountered an issue with the H column in my own code
    Fixed in post #19.

    EDIT: You don't need your formula - it's all done in KM's tweaked formula that I provided in post #19. These are formulae, not code - code is VBA.

    Glad to have helped.

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

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    Last edited by AliGW; 03-17-2024 at 06:37 AM.

  22. #22
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Thank you, AliGW, for sharing your code. I'll need some time to grasp it fully since I'm not an Excel expert. If I encounter any difficulties or uncertainties, would it be possible for me to reach out to you for assistance?
    Last edited by AliGW; 03-17-2024 at 07:06 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

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

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Just post again to this thread if you need help with this FORMULA (not code).

    For any new queries, start a new thread.

    For now, if that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  24. #24
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Try. single formula in D4. Last 3 columns are average, median, sd.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 03-17-2024 at 07:13 AM.

  25. #25
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Thumbs up Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Thank you again, kvsrinivasamurthy, for your assistance with the code. I was hoping for a slightly different approach, where the codes are separated into three different cells for clarity. I appreciate your willingness to incorporate my input into your file. If possible, could you please integrate your code accordingly? Your responsiveness is greatly valued.


    extracting unique data_nil.xlsx
    Last edited by AliGW; 03-17-2024 at 09:20 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  26. #26
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

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

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

    In L13
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 03-17-2024 at 09:14 AM.

  27. #27
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Lightbulb Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Thank you, kvsrinivasamurthy, for providing such efficient codes. Your kindness and expertise are truly appreciated.
    Best regards.
    Last edited by AliGW; 03-17-2024 at 09:19 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  28. #28
    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,869

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Once again, these are FORMULAE, not code or codes.

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

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  29. #29
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Thank you, AliGW. You're correct; these are indeed formulas, not codes. I attempted to add reputation by clicking on the * button, but unfortunately, it didn't work. I'm unsure why.
    Last edited by AliGW; 03-17-2024 at 09:19 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  30. #30
    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,869

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Didn't work? Did you get an error message? There should be no problam for you as a brand new member.

  31. #31
    Registered User
    Join Date
    03-16-2024
    Location
    Basel
    MS-Off Ver
    365
    Posts
    14

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    Please take a look at the attached file, where it indicates, "You must spread some Reputation around before giving it to kvsrinivasamurthy again." I may be wrong.

    star.jpg
    Last edited by AliGW; 03-17-2024 at 09:32 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  32. #32
    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,869

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    That means that you have already awarded that member reputation. However, I have not had any from you, so it should work for me.

    Please stop quoting unnecessarily.

  33. #33
    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,869

    Re: Extracting Unique Data from Repeating Parameters in Excel: Dynamic Approach Needed

    You seem to have sorted it now - thank you.

+ 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. Need VBA to split unique repeating product from serial no repeating value
    By johnmacpro in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-28-2023, 08:10 AM
  2. Power Query, Excel 2013/ 2016, Dynamic URL, Set parameters
    By dude6571 in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 08-17-2019, 12:29 PM
  3. [SOLVED] Creating Dynamic Parameters in Excel from link to Power Query
    By Stefj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-14-2019, 06:58 AM
  4. Transposing repeating vertical data to horizontal data but retaining unique values only
    By mgcarino14 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2014, 12:57 AM
  5. [SOLVED] Help for v-lookup approach instead of manually cell linking approach - Excel 2010
    By Mirisage in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-31-2013, 01:32 PM
  6. Help Needed - Extracting Columns Duplicate and Unique Elements
    By sanjeevpandey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-05-2012, 05:59 AM
  7. Extracting data from other worksheets using parameters
    By excel_neophyte in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-21-2009, 07:49 PM

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