+ Reply to Thread
Results 1 to 8 of 8

I need help calculating time and formatting a cell based on results.

  1. #1
    Registered User
    Join Date
    12-18-2019
    Location
    Los Angeles
    MS-Off Ver
    Microsoft 2016
    Posts
    6

    I need help calculating time and formatting a cell based on results.

    Hello forum

    I need your help solving an excel question. I need a formula that will calculate the columns as follow:

    If schedule date, schedule time and transmitted time columns values fall within the range of Line start date, line end date, line start time and line end time columns then show transmitted time cell is green otherwise display cell in red.

    EX:
    Line Start date Line end date Line start time Line end time Schedule date Schedule time Transmitted time
    11/1/2019 11/3/2019 23:00:00 28:00:00 11/2/2019 23:27:05 23:27:00

    Note that our hours go from 9:00 to 32:00

    Can you please help me with this question? Uploaded TXT file for better viewing of the collumns

    Thanks a bunch!

    Marcia
    Attached Files Attached Files
    Last edited by Marciabr2000; 12-18-2019 at 08:51 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,323

    Re: I need help calculating time and formatting a cell based on results.

    Welcome to the forum.

    A text file is of no use to us - please upload a workbook (desensitise it first).
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    12-18-2019
    Location
    Los Angeles
    MS-Off Ver
    Microsoft 2016
    Posts
    6

    Re: I need help calculating time and formatting a cell based on results.

    Hi ALi

    Thank you for the reply. I attached the excel file.

    Thank you

    Marcia Gould
    Attached Files Attached Files

  4. #4
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2202
    Posts
    1,468

    Re: I need help calculating time and formatting a cell based on results.

    I created a helper column in column A.
    This column is doing the comparison of scheduled date/time and scheduled date/transmitted time vs. Line Start Date/Line Start Time and Line End Date/Line End Time.
    If the scheduled fall in between start and End it returns a TRUE, if not a FALSE
    Then i added conditional Formatting to see if True then green, if False then Red

    This is the formula that is in column A which is your helper column.
    =IF(AND(AND(N2+O2>=I2+K2,N2+P2>=I2+K2),AND(N2+O2<=J2+L2,N2+P2<=J2+L2)),TRUE,FALSE)
    Attached Images Attached Images
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-18-2019
    Location
    Los Angeles
    MS-Off Ver
    Microsoft 2016
    Posts
    6

    Re: I need help calculating time and formatting a cell based on results.

    wow Fantastic Dosydos! I can say thank you enough! This formula will really help me out. Marcia

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,323

    Re: I need help calculating time and formatting a cell based on results.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  7. #7
    Registered User
    Join Date
    12-18-2019
    Location
    Los Angeles
    MS-Off Ver
    Microsoft 2016
    Posts
    6

    Re: I need help calculating time and formatting a cell based on results.

    Hi Ali

    Great profile pic! :-)

    THe only options under thread tools are "show printable version" or "subscribe to this thread" I don't have an option to close it.

    Marcia

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,323

    Re: I need help calculating time and formatting a cell based on results.

    You should have - we all have exactly the same options on that menu. I have done it for you this time.

+ 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-08-2013, 03:10 PM
  2. Calculating time length based on cell references
    By ChrisSacto in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-09-2013, 05:15 PM
  3. Replies: 5
    Last Post: 07-20-2012, 12:42 PM
  4. Calculating END time based on start time, breaks, and hours to complete
    By sweedey in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-01-2012, 11:29 AM
  5. Replies: 2
    Last Post: 01-27-2012, 11:53 PM
  6. Conditional formatting based on two cell results
    By Molecheese in forum Excel General
    Replies: 2
    Last Post: 05-07-2009, 04:23 AM
  7. [SOLVED] CONDITIONAL FORMATTING BASED ON RESULTS IN A CELL
    By jpreman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-26-2006, 11:10 AM
  8. [SOLVED] Formatting one cell based on results of another cell
    By AC in forum Excel General
    Replies: 3
    Last Post: 02-17-2006, 03:00 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