+ Reply to Thread
Results 1 to 6 of 6

How do I add a time to a cell based on a value in another column

  1. #1
    Registered User
    Join Date
    10-15-2023
    Location
    New York, New York
    MS-Off Ver
    2019
    Posts
    88

    How do I add a time to a cell based on a value in another column

    Ok let's make this easy it's hard to explain, at least for me

    So I deleted all my times in column C.........I have to add them back in

    Is there a way to automatically do this?

    For example: When column H says "MIDNIGHT CLOSE" there should be a time of 24:00 in column C
    When column H says "MIDNIGHT OPEN" there should be a time of 0:00 in Column C

    Is there a way I can populate this without manually typing it in?

    Thanks you guys are the best

    I filled in the 1/1/2024 day and 1/2/2024 day to show what it's supposed to look like
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: How do I add a time to a cell based on a value in another column

    Turn on AutoFilter. Filter on Midnight Close. Drag an existing time down. Or type it in the first cell and drag it down. Clear the filter. Repeat for Midnight Open. Turn off the AutoFilter.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: How do I add a time to a cell based on a value in another column

    Very simple.
    Filter your table, select the column cells, fill the first one then [Crtl]+[Enter].
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-15-2023
    Location
    New York, New York
    MS-Off Ver
    2019
    Posts
    88

    Re: How do I add a time to a cell based on a value in another column

    Quote Originally Posted by TMS View Post
    Turn on AutoFilter. Filter on Midnight Close. Drag an existing time down. Or type it in the first cell and drag it down. Clear the filter. Repeat for Midnight Open. Turn off the AutoFilter.
    this works nice I tried to give you reputation but it didn't let me for some reason I can't give two people reputation on the same post

  5. #5
    Registered User
    Join Date
    10-15-2023
    Location
    New York, New York
    MS-Off Ver
    2019
    Posts
    88

    Re: How do I add a time to a cell based on a value in another column

    oh it worked..........this takes the workload down a lot thanks

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: How do I add a time to a cell based on a value in another column

    You're welcome. Thanks for the rep.

+ 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: 5
    Last Post: 04-30-2022, 05:44 PM
  2. Calculating Cycle Time and Avg Cycle Time based on Date/Time and Raw Data Column
    By AggiePfaelzer in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 02-26-2022, 09:14 AM
  3. Replies: 1
    Last Post: 02-19-2020, 11:57 AM
  4. Return value from column B based on 1st time another value features in column E or G
    By chrisellis250 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2019, 11:18 AM
  5. Replies: 7
    Last Post: 08-21-2016, 10:45 PM
  6. Replies: 1
    Last Post: 02-07-2012, 03:55 PM
  7. EXCEL Sum column based on time range in different column?
    By RD975 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-13-2005, 01: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