+ Reply to Thread
Results 1 to 4 of 4

VBA to lookup lowest cost shipping from a different workbook

  1. #1
    Registered User
    Join Date
    06-05-2014
    Posts
    2

    VBA to lookup lowest cost shipping from a different workbook

    This is my first post here. I appreciate any help.
    What I need to do is look up the lowest cost shipper for each order item from a different workbook. Also, it must be the lowest cost shipper with an arrival date early enough to meet the customer’s request. My strategy so far:

    1 Sort the separate Cost workbook by OrderID, then by Arrival Date, then by Cost.
    2 Set a range in the Cost workbook that includes the above.
    3 Loop through the range, and for each OrderID, find the least cost shipper with an acceptable arrival date.
    4 Post that cost and name of shipper in the original workbook/worksheet (named Assignment).

    I think I can use this strategy with a MINIF function, but I have struggled for a long time to develop the right syntax.
    This is my code so far:
    Please Login or Register  to view this content.
    Thanks for any help.
    Last edited by alansidman; 01-08-2020 at 07:24 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: VBA to lookup lowest cost shipping from a different workbook

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    06-05-2014
    Posts
    2

    Re: VBA to lookup lowest cost shipping from a different workbook

    Did this work? I have not used tags before. I looked at other posts and tried to follow your directions but I see no changes to my original post. I have now gotten the word code to appear under "tags for this thread" below my post.

    When I hit the Edit Post button under this second post, it copied it over and I added this. However, When I hit the Edit Post button under my original post, no content appears in the new window. Nothing is copied over for me to edit.
    Last edited by rdishman; 01-07-2020 at 04:57 PM.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: VBA to lookup lowest cost shipping from a different workbook

    I have added them for you today. Please comply with all forum rules in the future.

+ 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. Spread shipping cost against items using a weighted formula
    By JDobbsy1987 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-30-2023, 11:34 AM
  2. [SOLVED] How to calculate Shipping cost based on UPS charges
    By colarguns in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-10-2018, 12:15 PM
  3. Lookup Cost In One Workbook Based on Yes/No Response
    By shawnr72 in forum Excel General
    Replies: 1
    Last Post: 07-31-2015, 12:33 PM
  4. How to calculate the cost of an Item after Shipping and tax
    By mohdm in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-21-2015, 12:54 PM
  5. How to calculate the cost of item after shipping and tax
    By mohdm in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-22-2015, 02:04 PM
  6. Help PLZ on my Shipping Cost calculator (Boss Deadline)....
    By sulcide in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-28-2013, 11:45 AM
  7. Lowest Cost Vendor
    By rafilip in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2012, 01:59 PM

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