+ Reply to Thread
Results 1 to 11 of 11

Hour Calculations With Blanks in Table

  1. #1
    Registered User
    Join Date
    03-26-2015
    Location
    USA
    MS-Off Ver
    2010, 2013
    Posts
    35

    Hour Calculations With Blanks in Table

    Below you will see a rough table. The HOURS column calculates the time between Start and Stop.

    The Formula I am using to do this is =(([@Stop]-[@Start])-INT([@Stop]-[@Start]))*24

    When there are blanks, I would like the calculation to pick up the next available time and calculate the HOURS next to the Stop time.

    I Need the following to auto calculate.

    15:20 to BLANK = 0.00
    BLANK to 16:13 = 15:20 to 16:13 = 0.88

    18:23 to BLANK = 0.00
    BLANK to 19:37 = 18:23 to 19:37 = 1.23

    Please advise.

    Thank you kindly.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Hour Calculations With Blanks in Table

    Try this formula in the Hours column.

    It is not table syntax. I do not know how to do the $F$5:F5 parts in table syntax.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  3. #3
    Registered User
    Join Date
    03-26-2015
    Location
    USA
    MS-Off Ver
    2010, 2013
    Posts
    35

    Re: Hour Calculations With Blanks in Table

    So that works within itself, but if anyone can figure a way to keep it in table syntax, that would be most helpful.

    Reason being that now a macro I've used to create an insert row button is not carrying that formula with it.

    Thank you for your help! It is greatly appreciated!

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Hour Calculations With Blanks in Table

    dharmon,

    I have been unable to find helpful info on this particular column reference structure.

    I have posted a question regarding this myself moments ago.

    If you would like to watch for answers too, this is the link.

    http://www.excelforum.com/excel-form...25-p-5-p5.html

  5. #5
    Registered User
    Join Date
    03-26-2015
    Location
    USA
    MS-Off Ver
    2010, 2013
    Posts
    35

    Re: Hour Calculations With Blanks in Table

    Thank you, FlameRetired!

    I am following the second thread you have created as well.

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,911

    Re: Hour Calculations With Blanks in Table

    Or try this...

    =IF(G5="",0,G5-LOOKUP(10^10,$F$5:F5))*24

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Hour Calculations With Blanks in Table

    @ Phuocam

    OP is looking for formula in Table syntax similar to this (not working) formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Needs to find how to reference $F$5:F5 with Table syntax.
    Last edited by FlameRetired; 05-04-2016 at 09:07 PM.

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Hour Calculations With Blanks in Table

    Found part of the answer here.

    http://www.excelcampus.com/tips/abso...uctured-table/

    Problem with Absolute References in Tables

    However, there is no direct way to create an absolute reference for a table reference in a formula. By default, all table references are absolute and have the following behavior when dragged or copied:
    •Formula dragged across columns: Column references change by referring to the next column to the right.
    •Formula copy/pasted across: Column references remain static; do not change when copy/pasted.

    When your formula needs to contain a combination of absolute and relative references, there is no way to drag or copy the formula across and keep the references correct. Dragging the formula across will make all the references change, and copy/pasting will make all the references stay the same.
    I assume the same is true for rows.

    Still working on an array formula.

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Hour Calculations With Blanks in Table

    dharmon

    This formula will have to be array-entered.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

    I did this in the original upload. Apparently it was VB enabled. Found no macros but had to be saved as macro enabled. I put no VBA in it.
    Attached Files Attached Files

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Hour Calculations With Blanks in Table

    An afterthought.

    This version does not have to be array-entered.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Hour Calculations With Blanks in Table

    And Tony Valko has another formula (segment) in my thread post 3.

    http://www.excelforum.com/showthread...35#post4378935

+ 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: 8
    Last Post: 11-02-2017, 03:53 PM
  2. Searching table for text, when table contains blanks
    By jimavet in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-24-2015, 12:49 PM
  3. How to: Miles per hour calculations
    By CarlZ993 in forum Excel General
    Replies: 4
    Last Post: 12-19-2014, 09:20 PM
  4. Distribute the hours , to a new table hour by hour.
    By turist in forum Excel General
    Replies: 1
    Last Post: 12-02-2013, 09:47 AM
  5. [SOLVED] Time calculations and additional 24 hour days
    By Mark G in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-29-2005, 04:45 PM
  6. [SOLVED] 24 Hour Calculations
    By Nen in forum Excel General
    Replies: 2
    Last Post: 06-14-2005, 04:05 PM

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