+ Reply to Thread
Results 1 to 5 of 5

Trying to Determine Cost based on multiple variables

  1. #1
    Registered User
    Join Date
    11-24-2020
    Location
    Bethlehem, PA
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    11

    Talking Trying to Determine Cost based on multiple variables

    Please refer to the image as it's the best way for me to explain what I'm trying to do. I want to look at the first three characters in the Indicator column (column A), look at the appropriate table that matches that value in columns F and G, grab the correct dollar amount in that table from column G based on the number of units in column B that corresponds to the number in column F, and then multiply B and F in column C. I've included the expected results in the image in columns J and K. This would be done over thousands of rows, so I only want to do this once and just be able to copy the formula all the way down column C. Any help is greatly appreciated!
    Attached Files Attached Files
    Last edited by jeffamore; 11-25-2020 at 11:55 AM.

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Trying to Determine Cost based on multiple variables

    if we assume your various rate tables are not "named" then, to keep things simple, I would do following:

    1. insert 2 blank cells in F1:G1 such that F1:G19 become F2:G20 etc (but A:B remains as-is)

    2. add a key to Col H

    H2: =CHOOSE(1+COUNT(F2:G2),INT(H1)+0.9,F2,INT(H1)+F2/10^7)
    copied down for all rows

    3. apply following to derive Cost

    C2: =B2*LOOKUP(LEFT(A2,3)+B2/10^7,H:H,G:G)
    copied down

    the above will replicate your expected results, and should be pretty quick to calculate.

    NOTE: this does assume, per screenshot, that your rate tables are listed in numeric order from small to large - both in terms of "key" (101 to 103 etc) and in terms of individual bands therein (0 to n)

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Trying to Determine Cost based on multiple variables

    Welcome to the Forum jeffamore!

    First, it is generally better to attach your actual file instead of a picture. Few people are going to take the trouble to create a new file based on your picture. That way we can implement a solution and give you the file back. See yellow banner at the top of the page.

    Here is an alternative for a formula you can put in C, with no other changes, although I haven't tested it. If you have trouble with it attach your file.

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


    Also I discourage the use of merged cells. Consider "Center Across Selection" to get the look you want.

  4. #4
    Registered User
    Join Date
    11-24-2020
    Location
    Bethlehem, PA
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    11

    Re: Trying to Determine Cost based on multiple variables

    I'm having a hard time replying and including the attachment with the workbook, but I appreciate the responses so far.

  5. #5
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Trying to Determine Cost based on multiple variables

    Hi, so, if you copy the formulas per Post #2 into your sample file (without modification) you should get your desired results.

    the alternative approach, c/o 6SJ, will work but it will be volatile, and assumes that your rate tables will always fit within 5 rows and never overlap (which may, or may not be the case)

+ 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: 3
    Last Post: 11-17-2020, 09:40 PM
  2. Determine averages with multiple variables
    By acarey2748 in forum Excel General
    Replies: 6
    Last Post: 01-12-2018, 07:34 PM
  3. [SOLVED] Determine Grade given multiple variables
    By USAI in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-07-2017, 08:00 PM
  4. Determine Employee Participation Rate with Multiple Variables
    By eliwaite in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-06-2014, 04:14 PM
  5. [SOLVED] Determine Cell Value Based on Multiple Variables
    By Phoenix5794 in forum Excel General
    Replies: 8
    Last Post: 09-07-2012, 02:54 PM
  6. calculating cost prices for a product with multiple variables
    By cbs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-02-2010, 07:36 PM
  7. Multiple independant variables in cost estimate
    By wmfinance in forum Excel General
    Replies: 2
    Last Post: 07-28-2010, 09:05 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