+ Reply to Thread
Results 1 to 4 of 4

Gap Analysis / Incorrect results.

  1. #1
    Registered User
    Join Date
    07-15-2019
    Location
    Norway
    MS-Off Ver
    Excel 2016
    Posts
    2

    Gap Analysis / Incorrect results.

    Hi, I have this problem that has been kicking my *** for the last few days, and I need your help for a hot minute.

    Context: I'm developing a model who's function is to reveal gaps in inventory i.e. gap analysis. The products are car parts, and whether or not we have a part in stock for a particular vehicle model.

    Let's say the bosses wants to figure out what are the gaps among all vehicle models between the model-years 2010 and 2000, and only for vehicles with over 1,000 registrations. Under these conditions I will find that we have 17 products we do not cover and this is correct.

    Problem: However, the issue is that in the event a car model has the same number of registrations, it will always show the first one on the list regardless if it breaks the conditions or not. What I do not understand is why the formula ignores the production year and stock conditions.

    Some suggestions I've found on the net requires sorting or manual work in each case. This is not viable as the real data has 70,000 different vehicles to consider. Moreover, the whole point of this project is automation and removing the need for manual sorting.

    I've included some real data and the formulas I've used to illustrate the problem, and hope some of you can give me some insight whether or not this is a solvable problem.

    Kind regards,

    Pål
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Gap Analysis / Incorrect results.

    Welcome to the forum.

    Windows 10 is NOT your MS Office version - please go back to your user profile and change this. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Gap Analysis / Incorrect results.

    That is how Excel's lookup formulas work when the "exact match" option is used -- if there are multiple copies of the same lookup value in the lookup range, then it will return the first entry it comes to. The solutions that I see involve doing something to make sure that each entry in the lookup range/array is unique. My ideas involve adding something (a text string or a number) to the end of each duplicate entry and then finding and searching for that -- almost always in a helper column (because I find things much easier that way). I'm not sure what limitations you have on this sheet or exactly how you might want to implement that, but that's what I see needing to happen.

    Somewhat unrelated (though it might impact decisions made regarding the previous problem), exact match lookups like you have are notoriously slow. You indicate that this database will grow fairly large. I don't know the limits of your patience, but I would expect that, at some point as this grows, it is going to reach a point where it begins to test your patience. I notice that you are repeating the exact same slow linear lookup 5 times in each row. You might consider some of the things talked about in this post https://www.excelforum.com/excel-for...ml#post4041181 to eliminate that duplicated effort to speed up the spreadsheet.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    07-15-2019
    Location
    Norway
    MS-Off Ver
    Excel 2016
    Posts
    2

    Re: Gap Analysis / Incorrect results.

    I fixed it, or kind-of. I implemented a search function and so they can quickly look up faulty values. This works well enough for our purposes since the error rate is not that large.

    Moreover, I managed to reduce my processing time by an order of magnitude (from 40s to 4s) thanks to your tip! Appreciate it bud

+ 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. Search and display results in userform Issue. Results are incorrect
    By olypro in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2019, 10:16 AM
  2. [SOLVED] If and OR function gives incorrect results
    By Karnik in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-05-2018, 04:21 AM
  3. [SOLVED] Incorrect results from sort
    By pongmeister in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-12-2016, 11:20 AM
  4. [SOLVED] Some incorrect results from a formula
    By spittingfire in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-09-2015, 08:25 PM
  5. [SOLVED] Incorrect results of UDF function
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-29-2014, 06:28 PM
  6. [SOLVED] Forumula Results Incorrect when data missing. Wanting to hide the incorrect formula.
    By firemedic6265 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-05-2014, 05:01 PM
  7. Incorrect calculatons in data analysis
    By k4katherine in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-12-2013, 04:11 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