+ Reply to Thread
Results 1 to 5 of 5

Please help on time interval chart

  1. #1
    Registered User
    Join Date
    08-18-2015
    Location
    Ireland
    MS-Off Ver
    Windows 7 Ultimate
    Posts
    4

    Smile Please help on time interval chart

    Appreciate any assistance please - Struggling with this.
    I have a number of pieces of equipment running over the day. I am trying to determine the peak demand at any 15 minute interval over a 24hr period. It is easy but time consuming to manually update (per attached) however I want to auto populate the time interval chart with the corresponding electrical demand (column F) over the time range.

    Take Activity 1 for example - I can say that there is a constant electrical demand of 2 between 00:30 and 08:30 therefore the time interval chart identifies a value of 2 for every cell from 00:30 - 08:30

    Also..
    In some cases the start time is greater or equal to the finish time implying over night (over midnight demand)

    In the attached I was trying =IF(AND(H2>=$D3,H2<=$E3),$F3,"") but it doesn't work

    Appreciate any ideas...
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,033

    Re: Please help on time interval chart

    Try this file - you had some times that were date and times, not just times.

    Demand - Time Interval fixed.xlsx
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    08-18-2015
    Location
    Ireland
    MS-Off Ver
    Windows 7 Ultimate
    Posts
    4

    Cool Re: Please help on time interval chart

    Bernie.... Thank you so much... I have not used IFERROR (or even considered it in this context).
    I have dropped into the schedule and it is 99% there.
    I have what is probably a silly consideration where if the start time = the finish time, it is a 24hr operation and as such starting at 01:00 and finishing at 01:00 is exactly the same as starting at 00:00 and finishing at 24:00. Is it possible to make the formula consider at start time that is equal to the finish time but can be 01:00(s)-01:00(F) or 03:00 to 03:00 (for example). (I see that you already feature($D3=$E3)*$F3) in your formula..

    If not possible, its perfectly fine... I am really grateful with what you have provided

    =IFERROR(1/(1/(($D3<$E3)*($D3<=H$2)*($E3>=H$2)*$F3 +($D3>$E3)*($E3>H$2)*$F3+ ($D3>$E3)*($D3<=H$2)*$F3)+($D3=$E3)*$F3),"")

    AS a sidenote (only if you have a minute) can you tell me why
    1. You use 1/1 initially at the beginning of the formula
    2. I assume that "$D3<$E3", "$D3<=H$2", "$E3>=H$2" etc... are conditions. I wasn't aware that you use an * between conditions... Perhaps I need to jump back to beginner level!!
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,033

    Re: Please help on time interval chart

    When the sum was 0, I wanted to force an error so that I could return "". I could have also used

    =IF(long formula = 0, "", long formula)

    But by using division 1/long formula if long formula is 0, I get the error. If it is not 0, I get 1/number, so I use 1/1/number to return number. It just makes the formula shorter.

    The series of multiplications:

    ($D3<$E3)*($D3<=H$2)*($E3>=H$2)*$F3

    If the individual components are TRUE, we get TRUE*TRUE*TRUE*Number to get the number. IF any of the conditions are false, TRUE*FALSE*TRUE*Number, we get 0. This too could have been re-written:

    ($D3<$E3)*($D3<=H$2)*($E3>=H$2)*$F3
    becomes
    IF($D3<$E3, IF($D3<=H$2, IF($E3>=H$2,$F3,0),0),0)

  5. #5
    Registered User
    Join Date
    08-18-2015
    Location
    Ireland
    MS-Off Ver
    Windows 7 Ultimate
    Posts
    4

    Re: Please help on time interval chart

    Again Bernie.... Thanks for your kind assistance... Worked perfectly

+ 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. COUNTIF time interval falls between set of time ranges
    By eyoonbbj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-15-2014, 01:44 PM
  2. Gantt Chart - Short Time Interval (0.1s) and Colorful Bars needed
    By starryjazz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2014, 09:36 PM
  3. Replies: 1
    Last Post: 04-29-2014, 04:42 AM
  4. Change interval in a chart or something
    By r1kkie in forum Excel General
    Replies: 1
    Last Post: 07-02-2013, 05:24 PM
  5. Replies: 0
    Last Post: 04-23-2012, 10:06 AM
  6. Excel 2008 : Line Chart Interval
    By dreamingsnowgirl in forum Excel General
    Replies: 2
    Last Post: 11-03-2011, 06:12 PM
  7. The best way to specify time interval ...
    By nicgendron in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2005, 11:05 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