# Thread: looking for Excel function (2002)

1. ## looking for Excel function (2002)

Hi,

I am looking for an Excel function that will be able to show produce an on/off cycle time, given the on/off time periods. An example of a worksheet that I am working on is attached. Note that in the attached spreadsheet, I manually entered the on/off values based on the time. I am looking for an Excel function/equation that will be do the same thing using the variable from C3:C7.

Thanks,
Hanan.

2. ## Re: looking for Excel function (2002)

Does this formula do what you want?

<pre>=IF(MOD(B11,(\$C\$4+\$C\$5))<\$C\$4,\$C\$6,\$C\$7)
</pre>

See attached file.

3. ## Re: looking for Excel function (2002)

Yes, exactly what I want. Could you explain to me this formula?

Thanks again,
Hanan.

4. ## Re: looking for Excel function (2002)

I'll try. What you have is a cycle that repeats every On Time plus Off Time. The MOD(B11,(\$C\$4+\$C\$5)) part of my formula gets the remainder of the current time divided by the On Time plus the Off Time. This will produce a set of values that increment from zero by the time interval up to On Time plus Off Time minus Time Interval. If that value is less than the On time, then the On Value is returned. If the value is greater than the On Time, then the Off Value is returned.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•