If A1 is "21-7" (or "10-4") and B1 is <= 21 (or 10), then the formula
below will return "On", otherwise it will return "Off".
=IF(A1="21-7",IF(B1<=21,"on","off"),IF(B1<=10,"on","off"))
Before entering the values "21-7" or "10-4" into cells, format those
cells as Text. Otherwise, Excel will attempt to treat them as dates.
Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
On Sun, 21 Feb 2010 09:19:38 -0800 (PST), "Waz'"
wrote:
I am struggling to come up with an elegant formula solution to
accomplish the following task...
I have a schedule with people working 21-7 (21 days on and 7 days off)
and 10-4 (10 days on and 4 days off)schedules. By defining either of
these schedule options in one column and the day number of their
rotation (say, the schedule is starting on day number 3 of a 10 day
rotation) I want to create a formula to complete the rows of a
schedule to show "working" or "off" based on just these two
variables.