+ Reply to Thread
Results 1 to 16 of 16

finding the closest location with inventory

  1. #1
    Registered User
    Join Date
    01-12-2020
    Location
    Chicago
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2302 Build 16.0.16130.20378) 64-bit
    Posts
    19

    Lightbulb finding the closest location with inventory

    Hello everyone, I am trying to figure out how to purchase a product from the closest location with inventory. Does anyone know a formula that I could use to figure this out?

    Thank you!
    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,916

    Re: finding the closest location with inventory

    Still using Excel 2016?
    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 HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: finding the closest location with inventory

    finding the closest location with inventory
    Which inventory? There are 2 types inventory 1 and 2, but I don't understand how to involve the inventory number.
    What are the expected results of the formula?

  4. #4
    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,916

    Re: finding the closest location with inventory

    For 365 (if by chance you have it):

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by AliGW; 06-27-2023 at 01:30 AM. Reason: Workbook added.

  5. #5
    Registered User
    Join Date
    01-12-2020
    Location
    Chicago
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2302 Build 16.0.16130.20378) 64-bit
    Posts
    19

    Re: finding the closest location with inventory

    This file probably does a better job defining the origin and destination.
    Attached Files Attached Files

  6. #6
    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,916

    Re: finding the closest location with inventory

    Once again, which version of Excel are you using? Please don't ignore anybody in your thread. Thanks.

  7. #7
    Registered User
    Join Date
    01-12-2020
    Location
    Chicago
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2302 Build 16.0.16130.20378) 64-bit
    Posts
    19

    Re: finding the closest location with inventory

    2016, 64bit

  8. #8
    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,916

    Re: finding the closest location with inventory

    Thanks for the rep comment in which you say that the solution works.

    Please update your forum profile to the CORRECT version of Excel (365).


    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

  9. #9
    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,916

    Re: finding the closest location with inventory

    2016, 64bit
    My solution will not work for you, then - why have you said that it works in the rep comment???

  10. #10
    Registered User
    Join Date
    01-12-2020
    Location
    Chicago
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2302 Build 16.0.16130.20378) 64-bit
    Posts
    19

    Re: finding the closest location with inventory

    You're right! Oddly enough it worked in the example file but it will not work with the data set that I am working with.

    I am currently getting a #CALC! error. (empty array)

  11. #11
    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,916

    Re: finding the closest location with inventory

    Then it WILL work, but there is something about the real dataset that is different.

    Provide a sample workbook that shows the error (desensetise it).

  12. #12
    Registered User
    Join Date
    01-12-2020
    Location
    Chicago
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2302 Build 16.0.16130.20378) 64-bit
    Posts
    19

    Re: finding the closest location with inventory

    OK here you go.
    Attached Files Attached Files

  13. #13
    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,916

    Re: finding the closest location with inventory

    Not surprising - you haven't adapted any of the ranges to suit the real data!

  14. #14
    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,916

    Re: finding the closest location with inventory

    Here you go:

    Please Login or Register  to view this content.
    There are somne errors that you'll need to debug - I can have a look later.

  15. #15
    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,916

    Re: finding the closest location with inventory

    Issues:

    1. No location 11418 in the DBL sheet.
    2. Row 9 - there will be multiple matches - what do you want to do in these cases?
    3. Row 25 - no other location with that product.
    Attached Files Attached Files
    Last edited by AliGW; 06-27-2023 at 11:41 AM. Reason: Workbook added.

  16. #16
    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,916

    Re: finding the closest location with inventory

    Are we there yet?

    If you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered 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. Replies: 2
    Last Post: 12-28-2022, 01:51 PM
  2. Find closest value(s) location in range
    By amirflax in forum Excel General
    Replies: 8
    Last Post: 12-05-2022, 10:45 AM
  3. [SOLVED] Finding closest location to a point, as well as the next two closest.
    By SolarDesign in forum Excel General
    Replies: 11
    Last Post: 11-11-2021, 02:39 AM
  4. Macro to find closest X workers to a location based on long/lat
    By tylerfring in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2021, 08:38 AM
  5. Display name of closest location
    By hawks12 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-22-2017, 10:49 AM
  6. Replies: 7
    Last Post: 05-02-2012, 01:00 AM
  7. Finding closest value in VBA
    By Christian411 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-28-2009, 07:53 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