IF statement

R

ryan.fitzpatrick3

I have this code. It is a conversion code from data in my table that
has numerous types of measurements, i.e. lbs, oz, fz, ea, etc. The
most common outside of lbs is oz and fz for fluids. I'm converting
everything into lbs because I purchase these items in lbs.

CONV: IIf([SIZE_UOM]="OZ" And "FZ",[SIZE_NUM]/16,[SIZE_NUM])

The "OZ" and "FZ" doesn't work properly, I want to convert all items
with OZ and FZ into lbs. What works is all OZ's are converted while
FZ's are not. How do I get both. Below is visual

item 123456 weight 16 OZ = says 1
( lb )
item 123453 weight 5 LB = says 5
( lbs )
item 123457 weight 16 FZ = should say ( 1 lb ) but it
says 16

how can i get this equation to work?

Ryan
 
L

Lord Kelvan

you cannot say "OZ" and "FZ"

you need to say

CONV: IIf([SIZE_UOM]="OZ" And [SIZE_UOM]="FZ",[SIZE_NUM]/16,
[SIZE_NUM])
 
R

ryan.fitzpatrick3

Thank you for the quick reply, but on my table the records with the FZ
still reflect the same number and its not converted.
 
R

ryan.fitzpatrick3

I did this instead

CONV: IIf([SIZE_UOM]="OZ" OR [SIZE_UOM]="FZ",[SIZE_NUM]/16,
[SIZE_NUM])

and it seemed to work. thanks.

Ryan
 
L

Lord Kelvan

o right sorry the and is an impossible function in that regards it is
too early in the morning

i am glad to help

Regards
Kelvan
 

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