+ Reply to Thread
Results 1 to 11 of 11

Pulling Data by uniqueID

  1. #1
    Registered User
    Join Date
    10-12-2020
    Location
    Jaipur
    MS-Off Ver
    Office 2016
    Posts
    8

    Pulling Data by uniqueID

    Hello Guys,


    I was wondering if there was a way to pull corresponding data by entering a uniqueID. I want to get dates and amounts of a particular uniquiID. For example, I enter 1001 in B1 (desired Sheet) then I want all the dates and amounts to come in chronological order as showed in the desired result sheet(highlighted in yellow). I'm struggling with this for long time. Please help.


    Thank you in advance.
    Attached Files Attached Files

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

    Re: Pulling Data by uniqueID

    Please confirm that your Excel version is 2016 and not 365 - if the latter, then you can take advantage of the new dynamic array functions.
    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.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Pulling Data by uniqueID

    Use Advanced Filter on the Data Tab
    Attached Images Attached Images
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    10-12-2020
    Location
    Jaipur
    MS-Off Ver
    Office 2016
    Posts
    8

    Re: Pulling Data by uniqueID

    It is Microsoft office professional plus 2016.

  5. #5
    Registered User
    Join Date
    10-12-2020
    Location
    Jaipur
    MS-Off Ver
    Office 2016
    Posts
    8

    Re: Pulling Data by uniqueID

    Thanks Alansidman for reply
    Yes. I can use advance filter but then I need to refresh it again and again. I was looking for more automatize way. Meaning, as soon as I enter uniqueID, I get desired result.
    I can also use m-code if there is a way.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Pulling Data by uniqueID

    I am not at home right now, but will set up a parameter query later today with PQ unless someone else does so first.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Pulling Data by uniqueID

    You can do it with a few formulae. Put this one in D2 of the Problem sheet:

    =IF(B2='Desired result'!$B$1,MAX(D$1,D1)+1,"-")

    Copy down as far as you like. Then use these formulae in the cells stated on the Results sheet:

    A4: =IF(ROWS($1:1)>MAX(Problem!$D:$D),"",INDEX(Problem!$A:$A,MATCH(ROWS($1:1),Problem!$D:$D,0)))

    B4: =IF(ROWS($1:1)>MAX(Problem!$D:$D),"",INDEX(Problem!$C:$C,MATCH(ROWS($1:1),Problem!$D:$D,0)))

    Copy these down as far as you think you will need.

    Hope this helps.

    Pete

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Pulling Data by uniqueID

    Since you indicated that you would accept a M-code solution, look at the attached.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-12-2020
    Location
    Jaipur
    MS-Off Ver
    Office 2016
    Posts
    8

    Re: Pulling Data by uniqueID

    Hi Pete_UK.
    It is working perfectly. Great Solution.
    Can I ask you for another help.

    The whole idea for this work was to calculate XIRR for each unique ID.
    Now I'm getting outflow amount/date by using Vlookup and inflow amount/date by using your formula.
    Since for each uniqueID the number of inflow amount/dates varies, XIRR formula is returning with value error.
    For Example, 1003 is working fine because I've dragged the formula exactly equal to number of entries for 1003. But for other uniqueID its not working.
    I'm attaching same example with more entries. Hope you understand what I'm trying to say.

    Thank you for previous solution. And if you could help me out with this, it will be a great help.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-12-2020
    Location
    Jaipur
    MS-Off Ver
    Office 2016
    Posts
    8

    Re: Pulling Data by uniqueID

    Hi alansidman
    Thank you for the solution

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

    Re: Pulling Data by uniqueID

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon 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 those who helped.

+ 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: 10
    Last Post: 05-07-2020, 08:07 PM
  2. [SOLVED] Pulling individual data in pivot table when data repeats. Need Calculated Field
    By ChemistB in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-11-2017, 02:12 PM
  3. Uploading data into tables with a button click & pulling back the data from the table
    By tvsreekanth in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-27-2013, 07:29 AM
  4. Code/Solution To Search All Text in a Cell and Pull UniqueID Corresponding to the Text
    By brandnew22 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-06-2013, 10:56 AM
  5. Pulling a Specific Cell when Pulling a Tabel from Web Based Data
    By Zallen89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-26-2013, 05:39 PM
  6. Hierarchy Indented List, Table, Column and Value - need to create uniqueid column
    By mcolli01 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-06-2012, 01:09 PM
  7. Pulling data from mutliple windows, and pasting the data in worksheets/tabs
    By msu4life in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-27-2012, 07:01 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