OO Calc to Excel: STYLE problem - how to dynamically change cell styles?

mgp69

New Member
Joined
May 25, 2011
Messages
1
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
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top