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

Converting a Text field to a Number field in Crystal

Status
Not open for further replies.

donnarenia

Technical User
May 28, 2010
41
US
Is there a way I can convert a field that is a text field (notes) and make it a number field so I can total the numbers in the field?
 

If the notes field stores single numeric values then:

tonumber(yournotesfield)

If you want to extract numbers from within a notes field that also contains text, or if there are multiple numeric values within the notes field, then that's a lot more work. If that's the case, provide some sample data please.

 
I think you should show samples of the field. Are you saying there are numbers embedded within text? Do you want to summarize across records? Or are there multiple numbers in the same row that you want to summarize?

-LB
 
The numbers are located in a text column called Notes and I wanted to sum the $$ amounts.

I added my notes column and (as suggested) I created a formula called "TexttoNum" and wrote the following formula
ToNumber({Time.Notes})

and then I Inserted a Summary by summarizing the field @TexttoNum
Calculate this summary - I selected Sum
summary location - I selected by my group

I then added this summary to my Group Footer to get a total.

Hope this helps others, And thanks again for the help.
 
Sorry, I got distracted and missed the entire earlier exchange between you and Brian.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top