View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default unions, intersections or array constants

Good point! Maybe these formulas instead...

=AND($AK$2<"",NOT(ISNUMBER(FIND("*",$AK$2))),SEAR CH("*"&$AK$2&"*","*JAN*MAR*MAY*JUL*SEP*NOV*"))

=AND($AK$2<"",NOT(ISNUMBER(FIND("*",$AK$2))),SEAR CH("*"&$AK$2&"*","*FEB*APR*JUN*AUG*OCT*DEC*"))

--
Rick (MVP - Excel)


"T. Valko" wrote in message
...
If your entries are not well controlled and if you want to protect
against the problem I outlined in my previous posting, then these
formulas should work for you...


Or not. I only tried to break the first one but the second one will break
just as well.

If AK2 = Jan*Mar*May the format is applied. So, what do you think the odds
of that happening are?

--
Biff
Microsoft Excel MVP


"Rick Rothstein" wrote in message
...
If your entries are not well controlled and if you want to protect
against the problem I outlined in my previous posting, then these
formulas should work for you...

For Blue
===============
=AND($AK$2<"",$AK$2<"*",SEARCH("*"&$AK$2&"*","*J AN*MAR*MAY*JUL*SEP*NOV*"))

For Green
===============
=AND($AK$2<"",$AK$2<"*",SEARCH("*"&$AK$2&"*","*F EB*APR*JUN*AUG*OCT*DEC*"))

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
One thing to watch out for in Biff's formulas... if your entries are not
well controlled, there is a remote possibility of getting false hits.
For example, if your user enters MarMay in AK2, the that cell will turn
blue. As structured, if your user types in any substring from
"JANMARMAYJULSEPNOV" (such as the MarMay I used) or from
"FEBAPRJUNAUGOCTDEC", then those substrings will be considered a hit.

--
Rick (MVP - Excel)


"T. Valko" wrote in message
...
Use the Formula Is option and use these formulas:

For Blue:

=AND($AK$2<"",SEARCH($AK$2,"JANMARMAYJULSEPNOV"))

For Green:

=AND($AK$2<"",SEARCH($AK$2,"FEBAPRJUNAUGOCTDEC"))

--
Biff
Microsoft Excel MVP


"Loadmaster" wrote in message
...
I am trying to make a conditional formatting formula in cell A3 that
goes
something like this =$AK$2=JAN, MAR, MAY, JUL, SEP, NOV to format Blue
and
=$AK$2=FEB, APR, JUN, AUG, OCT, DEC to format Green. It keeps coming
up with
"You may not use unions, intersections or array constants for
conditional
formatting criteria. Cell A3 and cell AK2 both have array fomulas. Is
there a
solution to make this work?