+ Reply to Thread
Results 1 to 6 of 6

lookup function fix

  1. #1
    Registered User
    Join Date
    03-12-2020
    Location
    UK
    MS-Off Ver
    365
    Posts
    12

    Question lookup function fix

    Hi All,

    Hopefully a quick one to solve here:

    To give you an idea of what I'm doing, I'm wanting to match a postcode with the first part of a postcode (postcode identifier) so I can assign a region code to it (find attached a sample to see what I'm talking about).

    I've been given the below formula which works a treat, however when I expand the table size (see bold, the real set has about 10,000 rows) as below:

    =LOOKUP(2,1/COUNTIF(C2,SUBSTITUTE('Region codes'!$A$2:$A$24," ","")&"*"),'Region codes'!$A$2:$A$24)

    So if I change to this:

    =LOOKUP(2,1/COUNTIF(C2,SUBSTITUTE('Region codes'!$A$2:$A$10000," ","")&"*"),'Region codes'!$A$2:$A$10000)

    It returns a 0 result, do you know why this is and how to fix?

    Thank you

  2. #2
    Registered User
    Join Date
    03-12-2020
    Location
    UK
    MS-Off Ver
    365
    Posts
    12

    Re: lookup function fix

    Here's the attachment
    Attached Files Attached Files

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: lookup function fix

    Try this in D2 copied down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    03-12-2020
    Location
    UK
    MS-Off Ver
    365
    Posts
    12

    Re: lookup function fix

    Hi thanks for this, it still appears to be returning a 0 unfortunately.

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: lookup function fix

    See attachment
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-12-2020
    Location
    UK
    MS-Off Ver
    365
    Posts
    12

    Re: lookup function fix

    This works a treat, I'll try and understand what you did to fix that

    Thanks for your help

+ 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. Function Help - LOOKUP (Site) & LOOKUP (Person within Values)
    By fwesley in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-21-2019, 01:05 PM
  2. [SOLVED] Lookup / Indirect function to lookup information from various tabs/worksheets
    By rajeshpansara in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-20-2019, 10:29 PM
  3. [SOLVED] Nest lookup Function to lookup name between date range and return value
    By bbeards in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2018, 01:37 PM
  4. lookup based on cellvalue... without the lookup function needed
    By NoSleepForMe in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-16-2016, 04:54 AM
  5. Time Intervals, Ranges, IF function, Lookup Function
    By HDTV in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-23-2014, 03:52 PM
  6. Create a lookup formula with an If or Lookup function
    By afountas21 in forum Excel General
    Replies: 2
    Last Post: 09-05-2012, 06:53 PM
  7. [SOLVED] Pivot table doing a lookup without using the lookup function?
    By NGASGELI in forum Excel General
    Replies: 0
    Last Post: 08-02-2005, 01:05 AM

Tags for this Thread

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