+ Reply to Thread
Results 1 to 6 of 6

Lookup code within a large name and return values

  1. #1
    Registered User
    Join Date
    01-11-2012
    Location
    sweden
    MS-Off Ver
    Excel 2007
    Posts
    47

    Lookup code within a large name and return values

    Hi,

    Please assist in building a formula to lookup values referencing unique code from a large name bearing that code and with a second reference to "rent"

    please find attached spreadsheet
    Attached Files Attached Files

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

    Re: Lookup code within a large name and return values

    You can use this formula in B3:

    =SUMIFS($I$4:$I$14,$H$4:$H$14,"Rent",$G$4:$G$14,"*"&A3&"*")

    then copy down.

    Note that you have zero shown in cells B5 and B7 - you need to correct your entries in A5 and A7.

    You will probably need to use semicolons ( ; ) instead of commas ( , ) in the formula, depending on your regional settings.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    01-11-2012
    Location
    sweden
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: Lookup code within a large name and return values

    Thanks Pete. Anychance we can tweak the formula without correcting entry in A5 (ignore A7, that was a typo)

    This is just a sample of a huge file, so will be hard for me to pick up and correct entries in column A
    Attached Files Attached Files

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

    Re: Lookup code within a large name and return values

    This change (shown in red) works for your sample data:

    =SUMIFS($I$4:$I$14,$H$4:$H$14,"Rent",$G$4:$G$14,"*"&LEFT(A3,5)&"*")

    by just using a maximum of the first 5 characters in column A.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    01-11-2012
    Location
    sweden
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: Lookup code within a large name and return values

    Thanks heaps 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,598

    Re: Lookup code within a large name and return values

    You're welcome - 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. Have a large lookup that depends on 2 values...
    By CallumWebley in forum Excel General
    Replies: 6
    Last Post: 04-22-2016, 07:22 AM
  2. Replies: 5
    Last Post: 12-14-2014, 07:02 AM
  3. Need help with creating VBA code to lookup return values in spreadsheets
    By cwcpoppa in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2014, 07:46 PM
  4. Replies: 0
    Last Post: 10-07-2013, 10:24 AM
  5. [SOLVED] Code to lookup values in x and y co-ordinates and return value in that co-ordinate
    By Brumbot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-22-2013, 03:38 AM
  6. Replies: 8
    Last Post: 12-09-2012, 10:30 PM
  7. Lookup Values on a large spreadsheet
    By mskli in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-25-2012, 09:07 AM

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