+ Reply to Thread
Results 1 to 10 of 10

Trying to create calculation based on particular criteria

  1. #1
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Question Trying to create calculation based on particular criteria

    Ok forum I need your help again!!!

    I have 2 worksheets with data. One of them is a bench mark template or expected times to complete devices based on batch size and product. The other worksheet is a report generated that shows the actual time techs worked on batches of equipment by product type. I am trying to automate a report that I will need to run every week. I have most of it automated but need some help with some calculations. I want to calculated the expected time to complete the work, based on the data provided in the benchmark worksheet. I do not want to use an average, and I want to use the expected time of completion based on batch size and product relative to the tech report. Column T is highlighted and where I want this formula to be entered. So if the Total Batch items is 1, then the expected calculation uses that time relative to the product and then multiplies that number to the batch size. Or if the batch size is 3, then it uses the time relative to a batch size of 3 and then multiplies that number by the batch size on the tech report and is entered in the highlighted column.

    I have attached the workbook I am working with.

    Look forward to any of the input and assistance I can get!!!!!!

    Thanks!!!!!!!
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Trying to create calculation based on particular criteria

    try the following formula in cell T2 and copy it down the column.
    Please Login or Register  to view this content.
    I was not sure what to do about batch size 5 and over. And I did not know what was the last column in the Benchmark sheet meant. So I programmed a condition (the IF part of the formula) to set an upper limit to the column to look at in the Vlookup table. You can change this to suit your requirement.
    Hope this help
    Regards
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Trying to create calculation based on particular criteria

    Pierre-
    There are only 4 columns I need to worry about on the bench mark worksheet. That is if the batch size is 1, 2, 3, or 4 and larger. So if the batch size is greater or equal to 4 then, the time in that column would be used. So would the formula you provided work in that manor?

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Trying to create calculation based on particular criteria

    Just change the >5 by >4 and it will work.

  5. #5
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Trying to create calculation based on particular criteria

    I guess my question is...will this formula calculate the time if the batch size is 1 unit with the batch time it is expected for 1 unit, or if the batch size is 3, then it uses the time expected for a batch size of 3?

  6. #6
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Trying to create calculation based on particular criteria

    Nevermind...I experimented with the formula and it works perfectly thanks!!!!!

  7. #7
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Trying to create calculation based on particular criteria

    Actually...one quick question...if I want to incorporate this into my macro...do i just do this...
    Please Login or Register  to view this content.
    Thanks!

  8. #8
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Trying to create calculation based on particular criteria

    Also...I was playing around with the batch Size and I think I understand the question before...The formula works great as long as the batch size is 4 or less. When the batch size is over 4 it calculates the expected time from the next column. How can I change...
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    To use the column for a batch size of 4 and larger on the bench mark worksheet, for all batch sizes 4 and over?

  9. #9
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Re: Trying to create calculation based on particular criteria

    Also...I was playing around with the batch Size and I think I understand the question before...The formula works great as long as the batch size is 4 or less. When the batch size is over 4 it calculates the expected time from the next column. How can I change...
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    To use the column for a batch size of 4 and larger on the bench mark worksheet, for all batch sizes 4 and over?
    Last edited by dwhite30518; 01-30-2014 at 01:36 PM.

  10. #10
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Trying to create calculation based on particular criteria

    this formula will use the column 4 for a batch size of 4 or over.
    Please Login or Register  to view this content.
    For your question about inserting this formula into a macro, you can't do it like this.In a macro, you usually use the R1C1 form of a formula instead of normal Excel cells reference.
    One easy way of knowing how your formula looks like in R1C1 format is to record a macro while you modify this formula. Then you stop the macro recording and you look at the code created by Excel. You can copy and paste this formula into your code and it's done. It should look like this:
    Please Login or Register  to view this content.

+ 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. Calculation based on a criteria
    By hoosier5 in forum Excel General
    Replies: 3
    Last Post: 10-25-2011, 10:40 AM
  2. Counif calculation based on 2 criteria
    By Stuand in forum Excel General
    Replies: 10
    Last Post: 08-30-2011, 06:22 AM
  3. Criteria based calculation help.
    By rosarionyc in forum Excel General
    Replies: 18
    Last Post: 11-19-2010, 05:49 PM
  4. MACROS: Sort by multiple criteria - Create tabs based off of criteria
    By svineyard in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2009, 10:48 AM
  5. Replies: 5
    Last Post: 11-26-2006, 04:45 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