+ Reply to Thread
Results 1 to 11 of 11

Auto Populate My Cost Per Order on Orders Workbook Based on SKU from Price List Workbook

  1. #1
    Registered User
    Join Date
    09-06-2016
    Location
    NA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    6

    Auto Populate My Cost Per Order on Orders Workbook Based on SKU from Price List Workbook

    Hi,

    I have searched through both major excel forum sites and could not find an exact solution to my question and have been trying to solve this for quite a while now so any help is very much appreciated.

    I have two workbooks, one is the list of items I sold “orders” and the other is my cost of goods “price list”. I would like to have my SKUs in my “orders” workbook automatically grab my cost from the “price list” workbook based on the SKU number and paste its price on the same row (in a blank cell) on the column next to it. My end goal is to find out my COGS for the month and have a breakdown of it by SKU.

    - I am able to export all of my orders for the month in a workbook. The workbook lists the SKU number in one column, and the quantity sold in the next.

    - I have my “price list” in a separate workbook. The price list contains only my SKU number and my cost for the item each in individual columns.

    - I would like to know how to have excel scan for the SKU in the “price list” workbook and bring in/input my cost of that SKU/item into the “orders” workbook. If there was more than 1 quantity of an item sold than it should calculate how much I sold based on the “quantity” column in that same sheet.

    - Note: I do not want the “orders” workbook to refer to a SKU’s price based on a SKU cell’s location because the SKU cell location may change. Would it be possible for the “orders” workbook to search for the SKU and bring in the cost solely based on the SKU number matching one another from the “price list” workbook?

    - Note: I am using Excel For Mac 2011

    - I have attached a sample of both files to maybe help get a better understanding of what I’m trying to do.

    Apologies ahead of time for my extremely limited knowledge of Excel. I hope this all made sense! A step-by-step explanation on how to get this done would be great.

    Thank you!
    Attached Files Attached Files
    Last edited by gblt; 09-11-2016 at 01:09 AM. Reason: Mark As Solved

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Auto Populate My Cost Per Order on Orders Workbook Based on SKU from Price List Workbo

    You can do a VLOOKUP across workbooks. The workbook with the data to look up doesn't even have to be open. However, it must remain in the same location with the same name once the formula is established. The other trick is knowing how big to make the range to look up. Here the range is A11:B34. If you add items to the list you will have to change the formula.

    =VLOOKUP(A3,'C:\Users\dflak\Temp\[Price List.xls]Inventory List'!$A$11:$B$34,2,FALSE)

    If the price list were in the same book with the orders, then you could assign a named dynamic range to it that will grow or shrink with the data. You can do this across workbooks like so: =VLOOKUP(A2,'Price List.xls'!Price_List,2,FALSE)
    where Price_List is defined as: Price_List =OFFSET('Inventory List'!$A$11,0,0,COUNTA('Inventory List'!$A:$A)-4,2)
    However, if you are using a named dynamic range, the workbook containing the range must be open in the same instance of Excel.

    A final question. You have 2011 which means you could use XLSX format. Is there a reason for providing XLS format? Do you have the option of downloading the data as CSV files? You can import CSV files into an XLSX file and do all your work there.
    Attached Files Attached Files
    Last edited by dflak; 09-07-2016 at 03:57 PM. Reason: Add attachment
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    09-06-2016
    Location
    NA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    6

    Re: Auto Populate My Cost Per Order on Orders Workbook Based on SKU from Price List Workbo

    Hi dflak,

    Thanks for your quick response! I understand that I will have to adjust the formula as long as the two spreadsheets will be in separate workbooks. I went ahead and tried the formula you provided me and didn't have any success. I tried to build out a VLOOKUP formula and this was the best I could come up with.

    Here is the formula I used:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    When I paste this into Column C on the "Orders" workbook, the result I am getting is "#REF!" and I'm not sure why because that Column exists in the "Price List" workbook.

    In other words, I need it to copy the value of "Column B" in the "Price List" workbook based on the reference of "Column A" matching it from "Column A" in the "Orders" workbook, then paste the value of "Column B" in the "Price List" workbook into "Column C" in the "Orders" workbook.

    Lastly, no reason why I was using the XLS format other than trying to make it as "user compatible" for everyone to be able to open it up on this forum. But my original files are in XLSX format. I can't download the "Orders" list in a CSV format.

    Let me know if you have any suggestions.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Auto Populate My Cost Per Order on Orders Workbook Based on SKU from Price List Workbo

    I believe that the #REF is coming from the table_array argument, '[Price List.xls]Inventory List'!$A$11:$A$34, to VLOOKUP. You are only referencing one column, A, however the result of the col_index_no argument, COLUMN('[Price List.xls]Inventory List'!$B$11:$B$34), is looking for values in a 2nd column. Try modifying the formula to read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    OR
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    09-06-2016
    Location
    NA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    6

    Re: Auto Populate My Cost Per Order on Orders Workbook Based on SKU from Price List Workbo

    Hey JeteMc,

    I'm sure you have been told many times, you are a genius! And to dflak as well, I appreciate your help (now that I look at it again your formula worked as well but I had to modify the file path which I wasn't to sure how to do. But the table array was exactly why it wasn't working.

    Now my other question is what function (and how to tie it in to this formula) can I add on to this that will take into account the quantity sold in "Column B" and multiply that by my "cost" or whatever value is placed in "Column C" in the "Orders" workbook?

    This is the whole formula I came up with (including what you provided me) using the "Add, Subtract, Multiply, or Divide" function. Would this be the one best suited for my task?

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Auto Populate My Cost Per Order on Orders Workbook Based on SKU from Price List Workbo

    Try pasting the following formula into C2, then double click the fill handle (lower right corner) to have the formula automatically copy down column C:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    You'll notice that in C12 the value is 2.5 meaning that the price of item GKWC-324-16 is $1.25 and two were purchased.
    Let me know if you have any questions.

  7. #7
    Registered User
    Join Date
    09-06-2016
    Location
    NA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    6

    Re: Auto Populate My Cost Per Order on Orders Workbook Based on SKU from Price List Workbo

    Worked like a charm! Thank you!

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Auto Populate My Cost Per Order on Orders Workbook Based on SKU from Price List Workbo

    You're Welcome, thank you for the feedback and marking the thread as 'Solved'. I hope that you have a blessed day.

  9. #9
    Registered User
    Join Date
    09-06-2016
    Location
    NA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    6

    Re: Auto Populate My Cost Per Order on Orders Workbook Based on SKU from Price List Workbo

    Sorry to keep the thread going again after I marked it as solved but I forgot to ask one thing!

    Let's say that the Column "B" in the Price List was instead in a column that was not adjacent to Column "A" like Column "D". How would I go about highlighting two non-adjacent cell ranges for the table array? I tried looking this up online and it was mentioned to use the command key on my Mac when highlighting the second cell range that is not adjacent but all that did was just put the second cell range values into the next argument which would be "col_index_num".

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Auto Populate My Cost Per Order on Orders Workbook Based on SKU from Price List Workbo

    Modify the formula in post #6 so that it reads:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let me know if you have any questions.

  11. #11
    Registered User
    Join Date
    09-06-2016
    Location
    NA
    MS-Off Ver
    Excel For Mac 2011
    Posts
    6

    Re: Auto Populate My Cost Per Order on Orders Workbook Based on SKU from Price List Workbo

    I see, so I just had to highlight the whole range including the other columns. I thought it would interfere somehow. But I guess that is why the "col_index_num" is there. To tell it what to refer to...

    Thanks again!

+ 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] Multiple IF's to calculate price based on cost and add handling charge and round price
    By RoyRose in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-13-2014, 01:18 PM
  2. [SOLVED] Setting a selling price based on cost price and order quantity
    By Steven811 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-11-2014, 08:07 AM
  3. [SOLVED] Auto Populate Order Form, based on qty's filled in Price list - Query
    By magpie10 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-11-2014, 02:08 AM
  4. Replies: 3
    Last Post: 03-11-2014, 02:10 PM
  5. Using Price list to populate Purchase order.
    By Vaalshuffle in forum Excel General
    Replies: 4
    Last Post: 03-02-2013, 12:02 AM
  6. How do I copy data from one workbook to create drop down lists in another workbook
    By mikeuk24 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2013, 05:08 PM
  7. Replies: 3
    Last Post: 02-28-2012, 11:54 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