+ Reply to Thread
Results 1 to 20 of 20

multiple criteria for calculations

  1. #1
    Registered User
    Join Date
    04-29-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    multiple criteria for calculations

    I have a spreadsheet that I am trying to have automatically calculate a total based on certain criteria:
    I want the amount under the per diem amount column W to return a value based on if P is entered in column V. If this is for partial it will depend on departure and arrival times. If departure is after 6:00 AM no breakfast per diem is paid, if departure is after 11:00 AM no lunch is paid. If arrival is before 2:00 PM no lunch. If arrival is before 7:00 PM no dinner. If the user enters a 1 or 2 in column U, 1 uses out of state per diem breakdown located in cells I38:I40. In state uses a 2 and is located in cells E38:E40.

    Please Help
    Attached Files Attached Files

  2. #2
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: multiple criteria for calculations

    I am looking at this and its honestly not making much sense to me. With my current understanding if my departure is at 10am and my arrival is at 8pm. You are going to charge my lunch twice. Please upload an example of all possible scenarios and the results it would look like.
    Thank those who have helped you by clicking the Star * below their name and please mark your post [SOLVED] if it has been answered satisfactorily.

  3. #3
    Registered User
    Join Date
    04-29-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: multiple criteria for calculations

    Sorry should have explained better. This shet is only for over night so the first day will only use the departure time. Any entry below the first row of entry that is not full per diem would be the arrival time back home does this help?

  4. #4
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: multiple criteria for calculations

    An example would be better. Can you upload a sheet with data on it so that I can see it?

  5. #5
    Registered User
    Join Date
    04-29-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: multiple criteria for calculations

    Ok here is a copy with an exampletravel reimbursment form.xls

  6. #6
    Registered User
    Join Date
    04-29-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: multiple criteria for calculations

    Here is a copy that should not pay for Breakfast on first day nor dinner on last day.travel reimbursment form.xls

  7. #7
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: multiple criteria for calculations

    I see the times are on different lines now. Okay. Let me work with what i know now and see what i can come up with.

  8. #8
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: multiple criteria for calculations

    Lets make sure I am doing this right.
    Example 1- If the customer departs at 5:00am they received full reimbursement and if out of state they would received $45 or would they receive $20 since we are talking about departing?
    Example 2- If the customer departs after 6:00am but before 11:00am then the receive partial reimbursement from not eating lunch but charged for breakfast because it was available to eat during the time of their stay and out of state again the per deim would just be lunch of $12.00?
    Example 3- If the customer departs after 11:00am they receive no reimbursement at all?

    Am I correct?

  9. #9
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: multiple criteria for calculations

    If I was correct then I believe this will work for you however I believe i over thought to formula to calculate the meals provided so that the formula adjusts the per diem without having to put how many meals were provided. Let me know what you think.
    Attached Files Attached Files
    Last edited by Jack7774; 04-30-2014 at 12:28 PM. Reason: spelling correction

  10. #10
    Registered User
    Join Date
    04-29-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: multiple criteria for calculations

    This didn't work. They will fill in full or partial (F or P field) I need the formula to look at that field and if P is provided then it will calculate based on the time left or arrived. Does that make sense?
    For example if I left on 05/01 at 11:30 AM I would put a P in the V column in the first row. The formula will then look to see if it is in-state or out of state. A 1 or 2 in U column. Based on these two columns and the time departed or left it will deduct the correct amount.
    So if I was traveling in state according to the per diem breakdown at the bottom of sheet the total day is 35.00 if I leave at 11:30 AM it will take 35.00 and deduct 15.00 (6.00 breakfast, 9.00 for lunch) so the total per diem should say 20.00.
    Does this help?
    I am reattaching my worksheet I tweaked a littletravel reimbursment form.xls

  11. #11
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: multiple criteria for calculations

    I apologize. My understanding of what you desire is unclear at this point.

    In the first post you asked that column W calculate based on whether or not column V has a P or not but you already have that calculation in place with the IF function yourself. IF V = "P" then, multiply full per fiem amount column T by .75, if not then its the full amount. Then you explained how the amounts would work if P based on departure time and arrival time. I presumed you wanted the formula to then figure out what the amount should be based on whether column V was P or not and based on the times was inputed. But in the post above this you mentioned column V would be manually entered in. I am confused as to why its necessary for me to understand the time at all then if the P will be manual and you already have a formula that works for what you want in column W.

    If anyone else can help please do.

    Here is what i thought you wanted. I thought you wanted to automatically calculate the sheet as much as possible. The facts required by a user was the date, from, to, departure time, arrival time, in or out of state. Based on that information the spreadsheet could then calculated based on understanding the time facts of breakfast, lunch, and dinner it would then autocalculate the full per diem rate, whether or not it was partial or full, and the per diem amount. This elminates the need to put P or F and the need to put in how many meals are provided. If this is not what you want then the spreadsheet you uploaded works for what you are asking for to the best of my understanding at this point.

  12. #12
    Registered User
    Join Date
    04-29-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: multiple criteria for calculations

    I am sorry for the confusion. Column V (F or P) is not an auto calculate field. the .75 was my figure before when it was automatically 75% per diem for the first and last day of travel. That is no longer the case, the amount of per diem is solely dependent on time departed or arrived, full or partial per diem, in state or out of state. If you can find other ways to make it more efficient I am all ears. I was requiring them to input the F or P because if they are out of town for several days all of the days at the location are full days. The only partial days will exist in the from work to and from the event location. Does this clear it up any?

  13. #13
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: multiple criteria for calculations

    I sent you a pm check it please. Need to iron out some details.

  14. #14
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: multiple criteria for calculations

    Okay. Try this. Yellow cells needed data and grey cells are autocalculated. You can change colors later when sheets is finished if you desire.

    Try the scenario you posed in your example and see if the results are correct.

    If its not there may be an issue with a formula. Save it with the error and below replace the grey cells with what the desired results should be and i will make it happen.
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    04-29-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: multiple criteria for calculations

    It worked except the return box returned the total per diem it did not subtract the dinner amount. I did not see if I typed in a arrival time in any of the other cells if the same error occurred. I highlighted the cell in red and typed the correct amount that it should have calculated.
    Thanks again for all of your help.error per diem.xls

  16. #16
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: multiple criteria for calculations

    I noticed another small issue as well and fixed it too. Those nesting formulas can get complex quick.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    04-29-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: multiple criteria for calculations

    Jesse,
    I am attaching a new sheet, when I changed the departure to 8:30 AM it should have included lunch and dinner in the per diem amount but it only included breakfast and lunch???Is it another nesting thingrecalulated per diem.xls

  18. #18
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: multiple criteria for calculations

    I had the wrong cells referenced. Keep checking to make sure the results are all correct. Try all three different times departure and arrival.
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    04-29-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: multiple criteria for calculations

    It Worked!!!!! Thank you so much for your help

  20. #20
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: multiple criteria for calculations

    If you find that it doesn't work for a certain one then let me know and I will fix that. I will keep the subscription to this thread on for a bit just in case. Thank you for the rep. I appreciate it much. Also don't forget to mark your thread solved unless you are waiting to make sure it works with everything that is.

+ 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. How can I do calculations on multiple fields on multiple worksheets
    By rgreene in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-20-2013, 11:01 AM
  2. [SOLVED] UDF for sum of multiple criteria in multiple columns and single criteria in multiple colum
    By Ganesh7299 in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 11-22-2013, 04:26 AM
  3. How do I make specific calculations based on numerous criteria?
    By Harmse in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-25-2013, 06:29 AM
  4. Multiple calculations in one SUMIF formula across multiple worksheets
    By necht_angel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-15-2011, 05:30 AM
  5. Doing multiple calculations.
    By berettagtz in forum Excel General
    Replies: 7
    Last Post: 04-11-2007, 01:42 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