Using totals to key text

G

Guest

Am using the expression:
=Switch((Sum([Raw]*24))>=40,"super",(Sum([Raw]*24))>=24 And
(Sum([Raw]*24))<=39,"PLUS",(Sum([Raw]*24))>=0 And (Sum([Raw]*24))<24,"NONE")

This results in (Example)
HARDY 17 NONE(RESULT OF >=0AND<24)
JONES 61 SUPER(RESULT OF >40)
RATE 25 PLUS(RESULT OF <=39AND>=24)
SMITH 8 SUPER (DOES NOT ADHERE TO ABOVE EXPRESSION, UNLESS
READING IT AS AN 80 (8*) OR >40
ANY SUGGESTIONS FOR A FIX?

THANKS
 
S

Steve Schapel

Lindy,

This is very strange. The numbers you gave in your example are the
values of Sum([Raw]*24), right? Can you please try it like this, and
see what the result is?...
=IIf(Sum([Raw]*24)>=40,"super",IIf(Sum([Raw]*24)>=24,"PLUS","NONE"))
 
G

Guest

Works great, Thanks

Steve Schapel said:
Lindy,

This is very strange. The numbers you gave in your example are the
values of Sum([Raw]*24), right? Can you please try it like this, and
see what the result is?...
=IIf(Sum([Raw]*24)>=40,"super",IIf(Sum([Raw]*24)>=24,"PLUS","NONE"))

--
Steve Schapel, Microsoft Access MVP

Am using the expression:
=Switch((Sum([Raw]*24))>=40,"super",(Sum([Raw]*24))>=24 And
(Sum([Raw]*24))<=39,"PLUS",(Sum([Raw]*24))>=0 And (Sum([Raw]*24))<24,"NONE")

This results in (Example)
HARDY 17 NONE(RESULT OF >=0AND<24)
JONES 61 SUPER(RESULT OF >40)
RATE 25 PLUS(RESULT OF <=39AND>=24)
SMITH 8 SUPER (DOES NOT ADHERE TO ABOVE EXPRESSION, UNLESS
READING IT AS AN 80 (8*) OR >40
ANY SUGGESTIONS FOR A FIX?

THANKS
 
S

Steve Schapel

Lindy,

That's good. But I'm still at a loss as to why your original idewa
didn't work... as far as I can see, there was nothing wrong with the
expression you used, just a bit more complicated than it needed to be :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top