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?
 
Back
Top