+ Reply to Thread
Results 1 to 8 of 8

Offset lookup

  1. #1
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    811

    Offset lookup

    I'm trying to achieve a lookup returning data which is somewhat irregular. I've attached a sample which explain the position better (if everyone isn't watching Superbowl)...
    Attached Files Attached Files
    Last edited by BRISBANEBOB; 02-07-2010 at 08:08 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Off-set look-up

    What is the result you're looking for ?

    Are you looking for last inspection date per property - if so - where are these values to be placed ?

  3. #3
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    811

    Re: Off-set look-up

    Apologies - I should have explained it better.

    I am reading the data into another workbook by looking up the propoerty ID and then trying to report on the last date that property was inspected.

    I can't change the format which lists the property ID, properties' address or inspection dates as that comes from a data dump.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Off-set look-up

    Hi Bob,

    Using a helper column D, in D8 enter

    Please Login or Register  to view this content.
    and copy down
    in E8 as an array formula (enter with Ctrl Shift Enter)

    Please Login or Register  to view this content.
    and copy down.

    What's all this about superbowl then? I hope you're not forsaking cricket to watch

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Offset lookup

    Quote Originally Posted by BB
    I am reading the data into another workbook by looking up the propoerty ID and then trying to report on the last date that property was inspected.

    I can't change the format which lists the property ID, properties' address or inspection dates as that comes from a data dump.
    If by "last" you mean "most recent" date then given the above I'd be inclined to break up the calculation for sake of simplicity... eg:

    For sake of demo. let's assume we're using the same workbook but a different sheet (you should be able to adapt to a different workbook).

    Using Sheet2 as results...

    Please Login or Register  to view this content.

    should you change A2 to another ID you should get a different output...
    or if preferred simply copy B:D down and enter different IDs in A3 onwards.

  6. #6
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    811

    Re: Offset lookup

    Gentlemen

    Thank you for the solutions - very much appreciated. Again!

    Wouldn't miss a minute of cricket as my ex-wife will testify (including Tests & ODIs) but I do love the Superbowl (moreso when SF 49ers used to win)

  7. #7
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    811

    Re: Offset lookup

    The array formula works beautifully except that the equipment here is very low rent and the data dump file is several hundred lines. This means it is taking a long time to run.

    Reverting to DonkeyOte's solution, I don't understand the use of the reference in the formula in D2 to SHeet1$C$30. Given the data I posted, this refers to the last date in column C. But if the dump varies in the number of lines, how do I pick up the last date? And is the last date always the one to pick up, or should it be the max date?

    Enlightenment sought...

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Offset lookup

    Quote Originally Posted by BB
    I don't understand the use of the reference in the formula in D2 to SHeet1$C$30. Given the data I posted, this refers to the last date in column C. But if the dump varies in the number of lines, how do I pick up the last date?
    Given none of the formulae used in this approach are "overly" expensive you could use a cell reference that's sufficiently large that it will always encase all data (eg $C$10000)

    If you do wish to use only the used range you could store the last row of numeric data in another cell and refer to it in the INDEX (or use a Defined Name to store this value).

    For sake of demo - assume we place the row number of the last row in Sheet2!A1:

    Please Login or Register  to view this content.

    The formula in D2 onwards can be adjusted to utilise the above value rather than refer to C30 explicitly:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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