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

Formula Help 1

Status
Not open for further replies.

ecugrad

MIS
Apr 17, 2001
191
US
Need a little help. I have a field named AccountNum,My AccountNum is a nine digit field. I want to build a formula that only counts the fields that start with 201.

Any help would be appreciated.


Jeff
 
if you want to insert a summary, create a formula field that checks if the AccountNum field starts with '201' (what type is this field?), if it does the formula should return an integer 1, else zero. Then create a summary field summing this formula field, and that should give you the correct figure.
 
The field is numeric, can you give me help with the formula.

Thanks
 
Try this:

Create a formula called @AccountNum
Put this code in and modify it with your exact field name:
Code:
if totext({table.AccountNum},0,"")[1 to 3] = "201" then
    1
else
    0
Insert the formula into the details section of your report.
Right click the field and choose Insert, Summary.
Make sure that the Summary type is Sum, the field is your new formula, and then choose the appropriate location from the location drop down.

I think that should do it for you.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top