+ Reply to Thread
Results 1 to 10 of 10

Returning the most recent set of data given some variables

  1. #1
    Registered User
    Join Date
    03-01-2017
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    16

    Returning the most recent set of data given some variables

    Sorry about the title, not entirely sure how to describe my problem and i'm certain it can be solved so hopefully someone can help me out;

    So i'm looking for a function that returns the result in K given it's the most recent date (column D) also given that it matches the E column.

    So for example, if i searched for "Steven Wilson" i would like to return the NULL (K12) result instead of 5.02 (K8) as NULL is newer.

    To slightly complicate things the name should also be fuzzy matchable and i'm currently using the isnumber(search) function to match names.

    Including the fuzzy name match a search for "Yuuwa" should yield 39.4 - i feel like all of this is possible but i'm not really too sure how to go about it.

    Can anyone shed some light on this?

    edit: uploaded excel data sample
    Attached Files Attached Files
    Last edited by eddyble; 07-16-2019 at 09:51 PM. Reason: solved

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

    Re: Returning the most recent set of data given some variables

    It would help if you attached a sample Excel workbook, so we can play about with different formulae.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Don't try to use the Paperclip icon, as it doesn't work on this forum.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-01-2017
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    16

    Re: Returning the most recent set of data given some variables

    apologies - updated op

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

    Re: Returning the most recent set of data given some variables

    Okay, so where do you want to enter the name you are searching for (i.e. which cell)?

    Pete

  5. #5
    Registered User
    Join Date
    03-01-2017
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    16
    Quote Originally Posted by Pete_UK View Post
    Okay, so where do you want to enter the name you are searching for (i.e. which cell)?

    Pete
    Let's say b1 - it doesn't matter truthfully, naturally this is a sample data set and the full version is 20000 rows deep, so the solution needs to work across that range as it's likely the name will appear multiple times with varying dates.

    My existing solution before I got this extended dataset was a =if(isnumber(search, "platinum",name column), max(range of rows above)+1,"" - this essentially made a series of increasing numbers next to the fuzzy match which I then used as a reference point to index match to another sheet. The solution still works just that it now reruns multiple dates instead of the most recent bit of data.

    Thanks for for the assist Pete

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

    Re: Returning the most recent set of data given some variables

    Using B1, then, as the cell where you can enter part of the name (e.g. Yuu or uwa or Wilson, or Tombl and so on - it doesn't have to be at the start of the name), you can use this array* formula in B2:

    =IFERROR(INDEX($K$2:$K$100,MATCH(1,($D$2:$D$100=LARGE(IF(ISNUMBER(SEARCH($B$1,$E$2:$E$100)),$D$2:$D$100),1))*(ISNUMBER(SEARCH($B$1,$E$2:$E$100))),0)),"")

    *Note that an array formula needs to be committed using the key combination of Ctrl-Shift-Enter (CSE) instead of the usual Enter. If you do this correctly then you will see curly brackets { and } around the formula when viewed in the formula bar, but you should not type these yourself. If you need to edit the formula then you must use CSE again to confirm it.

    I have used ranges up to row 100 (shown in red above), but you should change these to suit however many rows that you have (and use CSE to confirm).

    Put a partial name in B1 and B2 will show the value from column K that relates to the latest date for that name.

    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    03-01-2017
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    16

    Re: Returning the most recent set of data given some variables

    Thanks for that Pete - it works perfectly and solves the problem i described... but unfortunately i'm poor at describing problems.

    There's another variable i neglected to mention as i thought i'd figure out a solution to incorporate your solution into it but i'm not able to - sorry i should've explained my entire problem more clearly.

    The C column has a bunch of codes - maybe 5000 or so unique identifiers - the solution needs to somehow get the newest (by date) column K per individual unique code identifier (column C).

    i've added what my current output looks like, my current methodology as well as the desired output to hopefully add more colour

    Thanks and sorry about that
    Attached Files Attached Files

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

    Re: Returning the most recent set of data given some variables

    This extra requirement puts a totally different slant on things. I've tried a few things, but I've not been able to come up with a solution, and I'm actually away for a few days from tomorrow so I won't be able to work on this.

    It might be better to close this thread and start a new one, which includes all the requirements from the outset, and perhaps a new pair of eyes will be able to see how to do it.

    Pete

  9. #9
    Registered User
    Join Date
    03-01-2017
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    16

    Re: Returning the most recent set of data given some variables

    Sorry about that Pete,

    I actually solved it - it's a bit rudimentary but for my purposes that's more than enough.

    I used my existing solution that data dumps all fuzzy match results - i then flipped the data upside down and used a =IF(AND(COUNTIF('Code Array','Code reference')=1,MAX('misc array')+1,"")

    As a function of coincidence the 'bottom' set of the multiple data output is also the newest data so the above function creates a new number series only for the newest data - i then used this to index match a new list only containing the latest data set.

    It's... properly clunky but it works

    Thanks for all your help - much appreciated

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

    Re: Returning the most recent set of data given some variables

    Glad you got to a solution, and thanks for the rep.

    Pete

+ 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] Looking up data on one sheet based on two variables and returning a third to a second one?
    By Kabukibear in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-07-2019, 05:02 PM
  2. Replies: 2
    Last Post: 01-04-2016, 03:40 AM
  3. Returning Data with the most recent date and time
    By Asteer in forum Excel General
    Replies: 1
    Last Post: 05-04-2014, 05:15 PM
  4. Help need on returning data with three variables
    By mboyce82 in forum Excel General
    Replies: 6
    Last Post: 05-09-2012, 02:42 PM
  5. [SOLVED] Returning most recent daily data in a column if blanks in column
    By InnesMcc in forum Excel General
    Replies: 6
    Last Post: 11-04-2011, 09:41 AM
  6. [SOLVED] Returning most recent daily data in a column if blanks in column
    By InnesMcc in forum Excel General
    Replies: 2
    Last Post: 11-04-2011, 06:28 AM
  7. Returning Most Recent Value
    By eugev44 in forum Excel General
    Replies: 16
    Last Post: 05-26-2011, 02:50 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