+ Reply to Thread
Results 1 to 5 of 5

Formula Time calculation 2 variables

  1. #1
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Formula Time calculation 2 variables

    Hello All,

    I have a worksheet I am trying to get functioning. I could do with some formula assistance please.

    My situation:

    2 Variables 95941 and G0453

    If 95941 is in cell C6 then I need the minute time value in G11 to be converted into nearest rounded full hour

    In Cell F12 =calculated value & "Units of 95941


    If G0453 is in cell C6 then I need the minute time value in G11 to be converted to nearest rounded 15 min increment

    In Cell F12 =calculated value & "Units of G0453


    example: G0453 158 minutes in G11
    F12= 11 Units of G0453 (rounded up from 10.5)

    Thank you for your help,

    Patrick
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Formula Time calculation 2 variables

    LOOKUP table in J3:k4

    in F12

    =MROUND($G$11,VLOOKUP($C$6,$J$3:$K$4,2,0))/VLOOKUP($C$6,$J$3:$K$4,2,0)
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    604

    Re: Formula Time calculation 2 variables

    Ahh, John beat me again

    Well since I tried to figure this out, I thought I'd post my formula anyway.

    In F12:
    Please Login or Register  to view this content.
    Not near as elegant or expandable...but I tried

  4. #4
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: Formula Time calculation 2 variables

    Thank you both for your solutions.

    I made a few more attempts and this is what I came up with.

    =IF(C6="G0453",MROUND(G11/15,1)&" Units of Gcode",MROUND(G11/60,1)&" Units of 95941")

    Any pitfalls with this one? Seems to work.


    Patrick

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Formula Time calculation 2 variables

    None that I can see: in fact I "borrowed" your neater MROUND as follows (without the text label !!!

    =MROUND($G$11/VLOOKUP($C$6,$J$3:$K$4,2,0),1)

    Update:

    =MROUND($G$11/VLOOKUP($C$6,$J$3:$K$4,2,0),1)&" Units of "&C6
    Last edited by JohnTopley; 11-12-2021 at 12:55 PM.

+ 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: 0
    Last Post: 07-02-2021, 01:58 AM
  2. [SOLVED] adding two time variables to an existing formula
    By chriswrcg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-03-2019, 08:01 AM
  3. [SOLVED] Help with IF(AND formula for several variables for time sheet
    By cristylk in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-06-2017, 08:19 AM
  4. Time calculation formula to VBA
    By pjbassdc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2016, 11:23 AM
  5. Excel IF Formula with time variables
    By yazmin23 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-13-2012, 10:59 AM
  6. Appropriate formula for retrieving time spent on a project where 2 variables apply
    By Medilinklogistics in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-13-2012, 05:31 AM
  7. Time Calculation Formula!
    By Mike in forum Excel General
    Replies: 5
    Last Post: 07-23-2005, 12:05 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