+ Reply to Thread
Results 1 to 11 of 11

Variation of the lookup function

  1. #1
    Registered User
    Join Date
    04-22-2010
    Location
    ottawa, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    12

    Variation of the lookup function

    Good day all,

    I have an issue and would appreciate your help.

    I'm searching for the word HD_CLOSE and if found, I want excel to return the row where this word is found on another sheet.

    Problem: the row to be returned contains a custom date format of type < 8-11-2009 9:21:11 AM >

    When I use LOOKUP, I get an error for these date formats.

    Here is a sample:
    [HD_CLOSE ] [ 7-14-2009 10:19:54 AM] [SomeGuy] [More text]

    Any ideas how to go around this? (and no I can't change the date format in the original tables)

    Thanks;

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

    Re: Variant of the lookup function

    It's not clear (to me) if the [ ] are meant to represent cells or whether in fact:

    [HD_CLOSE ] [ 7-14-2009 10:19:54 AM] [SomeGuy] [More text]

    is a single string...

    Could you post an sample file (via paperclip icon - click Go Advanced if not visible) - with the file illustrating what you have and what you want to return ?

  3. #3
    Registered User
    Join Date
    04-22-2010
    Location
    ottawa, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Variant of the lookup function

    Hi,

    I've attached the file as requested.

    Thanks
    Attached Files Attached Files

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

    Re: Variant of the lookup function

    Assuming you want to do this with formulae the attached would be one route - assumes range on source sheet may alter etc (ie volume of data not always the same)

    The attached utilises named ranges (to minimise data processed) and a single column of helpers to reduce the calculation burden.

    (also assumes no changes can be made to "Original" sheet)
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-22-2010
    Location
    ottawa, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Variant of the lookup function

    This works great thanks,

    Now How do i get this search at total of 23603 rows?

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

    Re: Variant of the lookup function

    The named range (_Data) should adapt itself dynamically - you simply need to copy the formulae used to generate the output enough times so as to ensure all records are being returned (as determined by the value in S8 in the sample file)

  7. #7
    Registered User
    Join Date
    04-22-2010
    Location
    ottawa, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Variant of the lookup function

    Really appreciate your help.

    I have a new request.

    I am now requested to print the Opned and closed date based on the search for the string -->Incident #<--
    this formula would return the second row below the row where it finds the string " Incident # ".

    I have created and updated a second sheet

    Thanks in advance.
    Attached Files Attached Files

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

    Re: Variant of the lookup function

    Presumably you can apply similar logic to before only now concentrate on those rows within Column 3 of _DATA that contain C, no ?
    (Rather than Column 1 which contained HD_CLOSE as was the case in the prior request)

  9. #9
    Registered User
    Join Date
    04-22-2010
    Location
    ottawa, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Variant of the lookup function

    You are probably right.

    But I have no idea how to do this. I haven't done any coding in over 10 years, and even then, I'm was a C,C++ and java guy.

    Could you help?

    Thanks

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

    Re: Variant of the lookup function

    see attached as proof of concept (ie how you can modify)

    the only difference from this to the first file is that know you specify

    a) the criteria string (eg HD_CLOSE or C) in T6
    b) the column in which that string will be found in your main table in T7 (1 for A, 2 for B etc...)

    To get different results simply change the values in the yellow cells as appropriate, eg change T6 to C and T7 to 1 to get different results.
    (if you want different results simultaneously copy the sheet and have different values in each)
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    04-22-2010
    Location
    ottawa, Ontario
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Variation of the lookup function

    EX-CELLENT!
    Works like a charm.

    Thanks.

+ 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