+ Reply to Thread
Results 1 to 11 of 11

Need a formula to determine the date the unit was last switched on

  1. #1
    Registered User
    Join Date
    05-15-2023
    Location
    The Sea
    MS-Off Ver
    365
    Posts
    4

    Need a formula to determine the date the unit was last switched on

    1-May 3.5
    2-May 3.5
    3-May 3.5
    4-May
    5-May
    6-May
    7-May
    8-May
    9-May 3.5
    10-May 3.5
    11-May 3.5
    12-May 3.5
    13-May 3.5
    14-May 3.4
    15-May 3.4
    16-May 3.5
    17-May
    18-May
    19-May
    20-May
    21-May
    22-May
    23-May
    24-May
    25-May
    26-May
    27-May
    28-May
    29-May
    30-May
    31-May

    Listed above is my data. These are logs we take each day. I want a formula to detmine the date the unit was last switched on (last time it first had data (not the first or last time it had data) No data means it was not on
    I need to get the result 9th May as the last time it was switched on and then it ran for 7 days (9th to 16th) The second part is fairly simple. but I am really struggling with the first part due to the fact it can be on multiple times in one month.
    I could do this simply via PHP but I am struggling with excel formula
    Last edited by AliGW; 05-16-2023 at 02:29 AM. Reason: Thread title improved - generic thread titles are NOT permitted.

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Need a formula master

    Administrative Note:

    Welcome to the forum.

    Although we value your privacy as much you do, it could be important that members have a rough idea of your location as the solutions they offer may be affected by your locale. For instance, you might in the future post questions which are related to your regional settings.

    With this in mind, please update your profile to something more precise (something such as UK, Europe, USA, UAE, etc. will suffice).

    Also, there is a typo in your forum profile - there is no Excel 360, so please change it to 365.

    You need to read our rules - generic thread titles are NOT permitted. I shall change it for you this time.


    Finally, there are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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 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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Need a formula to determine the date the unit was last switched on

    Try this:

    =LET(l,LOOKUP(2,1/(B1:B31<>""),ROW(B1:B31)),MAX(IF(ROW(B1:B31)<l,IF(B1:B31="",A1:A30))+1))

    Please update your location as requested - a very general indication is fine. This is important - "The Sea" is not in any way helpful and does not indicate which type of locale you might be using. Thank you.
    Attached Files Attached Files

  4. #4
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Need a formula to determine the date the unit was last switched on

    Any questions?

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: Need a formula to determine the date the unit was last switched on

    Another way, please try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-15-2023
    Location
    The Sea
    MS-Off Ver
    365
    Posts
    4

    Re: Need a formula to determine the date the unit was last switched on

    Love you. that is perfect!. Apologies for the late reply. Literally sailing around the world hence my location the sea. I am all over the place. Internet comes and goes depending on weather haha.
    Thank AliGW :D

  7. #7
    Registered User
    Join Date
    05-15-2023
    Location
    The Sea
    MS-Off Ver
    365
    Posts
    4

    Re: Need a formula to determine the date the unit was last switched on

    Thank you HansDouwe <3 This is the perfect one. Works even if there is only one time on. Thank you
    Last edited by SCREF1; 05-17-2023 at 02:26 AM.

  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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Need a formula to determine the date the unit was last switched on

    Glad to have helped.

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

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  9. #9
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Need a formula to determine the date the unit was last switched on

    By the way:

    I am all over the place. Internet comes and goes depending on weather haha.
    That's not the point! Your location is there so that we have a clue as to your locale. Are you using a UK/US or European locale? Decimal points or commas? DD/MM/YYYY or M/D/YYYY? These things matter.

  10. #10
    Registered User
    Join Date
    05-15-2023
    Location
    The Sea
    MS-Off Ver
    365
    Posts
    4

    Re: Need a formula to determine the date the unit was last switched on

    Maybe to most, but I can program enough to adjust myself depending on which software is onboard which ship. Just excel formula thought process is far more math related than and its fairly new to me in terms of how you have to go about things. From this formula I will be adding lots of other formulas to adjust and change things, Just getting their initalty Programming would be far easier, being able to save variables but alas, anyways thanks again, I will mark as solved now

  11. #11
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Need a formula to determine the date the unit was last switched on

    OK - fair enough. Then "At Sea with Various Locales" would actually be more useful in your profile than "The Sea". If you leave it as it is, then you are going to get asked frequently to clarify it.

+ 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: 0
    Last Post: 04-07-2022, 07:49 AM
  2. [SOLVED] Slide master: don't show shapes that are overflowing the master in normal view
    By mike_vr in forum PowerPoint Formatting & General
    Replies: 5
    Last Post: 07-15-2020, 10:26 AM
  3. Replies: 2
    Last Post: 06-08-2017, 04:28 PM
  4. Master formula
    By Bray Head in forum Excel General
    Replies: 9
    Last Post: 11-14-2013, 01:31 PM
  5. Macro to overwrite master for changes made in master and read only
    By mk3supra in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2013, 07:48 AM
  6. Select all sheet copy paste as value & except Master 1 & Master 2
    By tek9step in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2010, 06:49 AM
  7. [SOLVED] FORMULA USING MASTER QTY
    By todd in forum Excel General
    Replies: 1
    Last Post: 08-10-2005, 02:05 PM

Tags for this Thread

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