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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count If other than 1

Status
Not open for further replies.

cjmcfg

IS-IT--Management
May 21, 2007
26
US
I'm very new to crystal, SQL, VB, and Access. I'm not really sure how to format a formula
I have an input from access into my report and i need to create a formula that will say

if this field equals a 1 or 3 add 1 but if the field equals 2 or 4 add .5

i know it's simple but any help would be appreciated
 
Hi,
A couple of ways,but the simplest is probably:
@NewValue
Code:
If {field} in [1,3] then
{field} + 1
else
If {field} in [2,4] then
{field} + .5
Else
{field}



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top