+ Reply to Thread
Results 1 to 5 of 5

time correction

  1. #1
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    time correction

    Hi

    I do not know when I made mistake but I can sort this out in the way I imagine.
    Let me explain a problem:
    I am import data from other system, like in cols A:C in attached file.
    Problem is that everything reported after midnight I cannot recognise as next day due to the fact that it is only time. So, as You can see in col. M I will correct time with IF to get data as I want to.
    When I put similar IF in formula in G2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    result is not as expected.
    I do not where is a problem.
    Attached Files Attached Files
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  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
    80,850

    Re: time correction

    Try this:

    =LET(MyData,FILTER($A:$C,$A:$A<>""),xTime,CHOOSECOLS(MyData,2),xCorrdT,BYROW(xTime,LAMBDA(r,IF(AND(r>0,r<0.25),r+1,r))),HSTACK(MyData,xCorrdT))
    Attached Files Attached Files
    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
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: time correction

    Or, a slightly simpler approach:

    =LET(MyData,FILTER($A:$C,$A:$A<>""),xTime,CHOOSECOLS(MyData,2),xCorrdT,xTime+(((xTime>0)*(xTime<0.25))),HSTACK(MyData,xCorrdT))

    Your original was breaking down and returning a single value and not an array at this point.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: time correction

    Using back your own formula, eliminating the part "AND(xTime>0,.......)" =LET(MyData,FILTER($A:$C,$A:$A<>""),xTime,CHOOSECOLS(MyData,2),xCorrdT,IF(xTime<0.25,xTime+1,xTime),HSTACK(MyData,xCorrdT))

  5. #5
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: time correction

    Quote Originally Posted by Glenn Kennedy View Post
    Your original was breaking down and returning a single value and not an array at this point.
    That was a reason.

    Thank You all.

+ 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. Formula correction? IF ...
    By Kathrynaki in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-16-2021, 07:11 PM
  2. [SOLVED] vba code correction
    By antonio32 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-26-2017, 08:39 AM
  3. Time and date formula correction
    By mazan2010 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-31-2017, 02:04 PM
  4. [SOLVED] Formula correction
    By Kym-B in forum Excel General
    Replies: 2
    Last Post: 01-09-2014, 07:27 AM
  5. [SOLVED] IF formula correction
    By mra1984 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-06-2013, 12:36 PM
  6. Need Professional Correction
    By yiannis1925 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-09-2011, 10:03 AM
  7. correction
    By nowfal in forum Excel General
    Replies: 4
    Last Post: 03-24-2006, 02:40 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