I am trying to convert a spreadsheet from Open Office Calc to Excel and am struggling due to the apparent lack of a STYLE function.
The original OO version creates a Gantt chart by dynamically setting the styles of cells depending on various conditions. It does this using the +STYLE function and works really well.
Unfortunately Excel does not seem to have an equivalent.
An example of the formula is:
=('Weekly Breakdown'!J4) +STYLE(IF(AND(W$1>$K4,(V$1-1)<$L4),IF(V$187,IF(AND(TODAY()>=V$1,TODAY()<W$1),CONCATENATE($M4,"_MILESTONE_THISWEEK"),CONCATENATE($M4,"_MILESTONE")),IF(AND(TODAY()>=V$1,TODAY()<W$1),CONCATENATE($M4,"_THISWEEK"),$M4)),IF(V$187,IF(AND(TODAY()>=V$1,TODAY()<W$1),"MILESTONE_THISWEEK",IF(TODAY()>=V$1,"Milestone_Past","Milestone")),IF(AND(TODAY()>=V$1,TODAY()<W$1),"DEFAULT_THISWEEK",IF(TODAY()>=V$1,"Default_Past","Default_Future")))))
This works by concatenating a string dependent on various conditions and applying a style of the concatenated name to the cell.
I know that Excel has "Conditional formatting", but it seems limited because:
a) I can't seem to select the name of the style I want applied (I can only manually format)
b) I seem to be limited to a maximum of 3 conditions
(I am currently trying this in Excel 2002, but might be prepared to upgrade to a more recent version if I could guarantee it could solve the problem.)
What options do I have?
Is there an equivalent of the OO Calc STYLE function?
Is conditional formatting practical for this level of complexity?
Do I need to investigate a VB macro?
Any help gratefully appreciated!
Thanks,
Mark
The original OO version creates a Gantt chart by dynamically setting the styles of cells depending on various conditions. It does this using the +STYLE function and works really well.
Unfortunately Excel does not seem to have an equivalent.
An example of the formula is:
=('Weekly Breakdown'!J4) +STYLE(IF(AND(W$1>$K4,(V$1-1)<$L4),IF(V$187,IF(AND(TODAY()>=V$1,TODAY()<W$1),CONCATENATE($M4,"_MILESTONE_THISWEEK"),CONCATENATE($M4,"_MILESTONE")),IF(AND(TODAY()>=V$1,TODAY()<W$1),CONCATENATE($M4,"_THISWEEK"),$M4)),IF(V$187,IF(AND(TODAY()>=V$1,TODAY()<W$1),"MILESTONE_THISWEEK",IF(TODAY()>=V$1,"Milestone_Past","Milestone")),IF(AND(TODAY()>=V$1,TODAY()<W$1),"DEFAULT_THISWEEK",IF(TODAY()>=V$1,"Default_Past","Default_Future")))))
This works by concatenating a string dependent on various conditions and applying a style of the concatenated name to the cell.
I know that Excel has "Conditional formatting", but it seems limited because:
a) I can't seem to select the name of the style I want applied (I can only manually format)
b) I seem to be limited to a maximum of 3 conditions
(I am currently trying this in Excel 2002, but might be prepared to upgrade to a more recent version if I could guarantee it could solve the problem.)
What options do I have?
Is there an equivalent of the OO Calc STYLE function?
Is conditional formatting practical for this level of complexity?
Do I need to investigate a VB macro?
Any help gratefully appreciated!
Thanks,
Mark