IIf Statement Calculation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need an IIf statement similar to this one...

Volume: IIf(([Size]=("*/5")),(5*[Units]),[Size])

It needs to multiply the Units field times 5 if the Size field ends in /5.
There are letters before the /5, but the /5 makes it unique. I believe some
of the context is not correct in the statement as it keeps returning the Size
field and performing no calculations. Could someone please help with this
statement?
 
Try using iif(right([size],2) ="/5",5 * [units],[size]) instead and you may
get better results. Assuming I've understood what you're after, and I think
you'll get better results.
 
Thanks, just wondering - is it possible to include wildcards * in iif
expressions?

Daz said:
Try using iif(right([size],2) ="/5",5 * [units],[size]) instead and you may
get better results. Assuming I've understood what you're after, and I think
you'll get better results.

GOL said:
I need an IIf statement similar to this one...

Volume: IIf(([Size]=("*/5")),(5*[Units]),[Size])

It needs to multiply the Units field times 5 if the Size field ends in /5.
There are letters before the /5, but the /5 makes it unique. I believe some
of the context is not correct in the statement as it keeps returning the Size
field and performing no calculations. Could someone please help with this
statement?
 
You can use a wildcard if you also use the Like function.




GOL said:
Thanks, just wondering - is it possible to include wildcards * in iif
expressions?

Daz said:
Try using iif(right([size],2) ="/5",5 * [units],[size]) instead and you may
get better results. Assuming I've understood what you're after, and I think
you'll get better results.

GOL said:
I need an IIf statement similar to this one...

Volume: IIf(([Size]=("*/5")),(5*[Units]),[Size])

It needs to multiply the Units field times 5 if the Size field ends in /5.
There are letters before the /5, but the /5 makes it unique. I believe some
of the context is not correct in the statement as it keeps returning the Size
field and performing no calculations. Could someone please help with this
statement?
 

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

Similar Threads

Iif Statement help 6
Multiple iif challenge 2
Query Criteria IIf statement 4
Select case - never ending 2
Sum IIF Expression One Field Two Codes 8
Multiple IIf statements 3
Iif Function 6
IIF statements 2

Back
Top