Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if function

Status
Not open for further replies.

workshop

Technical User
Nov 9, 2001
55
US
How do I create the if funtion that if
field A Field B Field C
a 10
b 5
c 10
d 8

I like to make Field C that if field A is a then field B*.2, if field A is b then field B*.4, so on
Please help
Thanks
 
The less messy way is to make your result a calculation which, using your example, is:
Case
(
C = a, b * .2,
C = b, b * .4
)

Keep adding more of these as needed. You can (and should) have a default value at the end if C can ever have an upredictable/unchecked-for value.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top