What I asked for now works but what I have asked for is not exactly what I need.
What I need is this
conditional format; in excell 2003
if(and(L3:L1000=1,M3:M1000=2),format colour blue in both columns L,M
if(and(L3:L1000=2,M3:M1000=2),format colour blue in both columns L,M
if(and(L3:L1000=3,M3:M1000>0),format colour green in both columns L,M
if(and(L3:L1000=4,M3:M1000=>0),format colour yellow in both columns L,M
if(and(L3:L1000=5,M3:M1000=>0),format colour pink in both columns L,M
if(and(L3:L1000=6,M3:M1000=>0),format colour red in both columns L,M
As you can see there are 6 conditional formats but on the toolbat conditional format it only allows 3 conditions.
So thats why I need to have code in VB giving me these formats.
Columns L and M have formulas in them;
column L has =IF(D363="","",SUMPRODUCT(COUNTIF(D363:I363,$A$1:$N$1)))
column M has =IF(D363="","",SUMPRODUCT(COUNTIF(J363:K363,$A$1:$N$1)))
So when column L or M have ""due to the start of its formula being =IF(D363="","", it has no colour but as soon it becomes a value the colour needs to change automatically.
Regards Henk