+ Reply to Thread
Results 1 to 6 of 6

How to Automatically Get Next Destinations

  1. #1
    Registered User
    Join Date
    05-09-2018
    Location
    Lagos
    MS-Off Ver
    2010
    Posts
    14

    How to Automatically Get Next Destinations

    Good day all,

    I have some destinations that I want my formula to choose from until the monthly target is met.
    For example , in the attached file, A has done one trip but target has not been met, which means
    that my formula will need to pick options from the destinations which can be either 2,3,4,5 or 6 as the case may be.

    Monthly Target Current Cost 1ST Target 2nd Target 3rd Target 4th Target 5th Target 6th Target
    300,000 A 95,637 City M City N City X City Z
    300,000 B
    300,000 C
    300,000 D

    Like the above , I want my formula to tell me that A will need to go to City M, City N, City X and City Z
    in order to meet monthly target.


    Thanks you.


    .
    Attached Files Attached Files
    Last edited by BOBINIHI; 06-28-2020 at 04:28 AM.

  2. #2
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: How to Automatically Get Next Destinations

    I'm not clear on exactly how this is to work.

    (1) In your example A starts with $95,637 - because of a visit to city-O ??

    (2) "A" visits cities M, N, X, Z for a cost of 95,637+32,567+54,238+56,734+25,678 = 299,976
    Why could "A" not visit city-Y rather than city-Z for a total of 264,854 which also exceeds target?
    Last edited by GeoffW283; 06-28-2020 at 12:28 PM.

  3. #3
    Registered User
    Join Date
    05-09-2018
    Location
    Lagos
    MS-Off Ver
    2010
    Posts
    14

    Re: How to Automatically Get Next Destinations

    @GeoffW283 Thanks for your response.

    The city to visit can be in any order.
    Actually, the target is $300,000.

  4. #4
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: How to Automatically Get Next Destinations

    I'm still struggling to understand the problem. I asked 2 questions in post #2 to try to begin to get a bit of insight but I don't think you have answered either. In post #3 you now say that the target is $300,000 rather than $250,000 originally stated, so now I have a 3rd question:

    (3) From your original example where "A" visits cities M, N, X, Z - why is this a valid solution as it totals just $299,976 which is less than your revised target of $300,000?

    In general, any further info that you could provide would be helpful.

  5. #5
    Registered User
    Join Date
    05-09-2018
    Location
    Lagos
    MS-Off Ver
    2010
    Posts
    14

    Re: How to Automatically Get Next Destinations

    Thanks once again.
    A first visited City O.
    It is almost impossible to get exactly $300,000, so we can use the closest.

  6. #6
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: How to Automatically Get Next Destinations

    Still struggling to understand. Let's try this:
    Here's a picture of your workbook with inputs as described below.

    BOBINIHI.png

    Do I manually enter destinations in D2 thru I5 as shown above and then have a formula in column-C to automatically compute the current cost??

    That's what I have assumed above.

    Is this what you are looking for? If so then in C2 copied down to C5
    =SUMPRODUCT($N$4:$N$9, --NOT(ISERROR(MATCH($M$4:$M$9, $D2:$I2, 0))))

    Let me know if this is on the right track. If not then please indicate what data is manually entered and what data is to be automatically calculated and, in words, describe the calculation.

    Hopefully we're getting a bit closer!
    Geoff

    Did I help significantly? If you wish, click on * Add Reputation to say thanks.
    If your problem has been resolved please select ?Solved? from the Thread Tools menu

+ 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. [SOLVED] Count Days Between Specific Destinations
    By fearonc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-04-2019, 02:16 PM
  2. Replies: 1
    Last Post: 07-31-2016, 03:37 AM
  3. Loop with miltiple destinations
    By vincenzo345 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2013, 03:01 AM
  4. [SOLVED] .Cell Value with Multiple destinations
    By BuzzOffSweetheart in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2012, 11:02 PM
  5. Changing a worksheet destinations name with the .Name property.
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-21-2011, 11:19 AM
  6. Use a calendar control with multiple destinations
    By Josh_123456 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2007, 12:01 PM
  7. [SOLVED] are multiple Hyperlink destinations, in one cell possible
    By nastech in forum Excel General
    Replies: 1
    Last Post: 10-21-2005, 03:05 PM

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