+ Reply to Thread
Results 1 to 9 of 9

Times in multiple columns

  1. #1
    Registered User
    Join Date
    10-13-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2013
    Posts
    52

    Times in multiple columns

    Hi all gurus,

    I am trying to find a formula to capture Time From and Time To in two columns (see columns A & B in the attached). However, the challenge is, my time data are captured in different columns (due to the way data is structured). is there a formula to be able to capture time from different columns?

    Appreciate the help
    Attached Files Attached Files

  2. #2
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Times in multiple columns

    You could use helper columns containing the final Time 1 & Time 2, and this would contain an IF statement checking cells for blanks and displaying the final time.
    e.g. for Time 1 to check the first 2 Time 1 cells in C4;
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    And copy down to C7 to show you the concept.

    Then you would do your calculation from this one cell.

  3. #3
    Registered User
    Join Date
    10-13-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2013
    Posts
    52

    Re: Times in multiple columns

    Thanks for this, however, not all cells are empty, some of them have data in them .

    S

  4. #4
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Times in multiple columns

    Maybe you then need to show in your sample what the "real" data looks like.

  5. #5
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Times in multiple columns

    If you are able to use PowerQuery
    with your current example
    - load marked range to PQ Editor
    - merge datetime columns with space delimiter
    - split merged columns by space delimiter
    - remove unnecessary columns and stay with two time columns
    - do cosmetic changes - header names
    - load this table to the sheet
    Last edited by sandy666; 07-18-2018 at 10:06 PM.

  6. #6
    Registered User
    Join Date
    10-13-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2013
    Posts
    52

    Re: Times in multiple columns

    hi all,

    reattaching the file again for clarity.

    S
    Attached Files Attached Files

  7. #7
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Times in multiple columns

    Once again is that a "real" representation of your data, ie. all the text is the same except for Column F which has all the same text in itself?

  8. #8
    Registered User
    Join Date
    10-13-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2013
    Posts
    52

    Re: Times in multiple columns

    Not really, as cannot publish real data due to confidentiality. however, the data could be in different formats.

  9. #9
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Times in multiple columns

    once again
    Are you able to use PowerQuery?

    Power Query for

+ 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. [SOLVED] copy columns multiple times for each customer value
    By logisticsexcel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-04-2017, 05:28 AM
  2. [SOLVED] Copy multiple columns x number of times based on variable number?
    By nobodyukno in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-19-2017, 04:13 PM
  3. [SOLVED] Averaging the earliest start times and latest end times for multiple days
    By kbiro in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-26-2016, 02:15 PM
  4. Replies: 13
    Last Post: 12-19-2013, 11:06 PM
  5. [SOLVED] Transposing columns and known rows multiple times
    By aprcamb in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-06-2013, 03:55 AM
  6. Macro for copying multiple columns and pasting 'n' times to another workbook
    By busybee235 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 10-01-2012, 02:10 PM
  7. Need macro help with transposing columns to rows and repeat a row value multiple times
    By InnovativeAJ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2012, 11:53 AM

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