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

Convert Excel Numbers to a Delimited String

Status
Not open for further replies.

jwrjwr54

Technical User
Apr 21, 2003
41
US
Using Crystal Reports Professional XI

In Excel I have a column of employee numbers. To use these numbers in Excel, I need to convert to a string (the table field is a string value). The only way I can get this to work is to take each employee number, add a " before and after the number, then add a , to seperate the numbers.
EXCEL
A1: 484458
A2: 12345
A3: 5589

In Cyrstal, the numbers need the " and comma seperator:
{EMPLOYEE.EMPLOYEE_NUMBER} in ["484458","12345","5589"]

Is there a formula for Crystal that will take the Excel data and convert to a string?
Thanks
 
If I'm following what you want to do, you could leave the Excel number as a number and add a comma to the next column in Excel (copy it down the column), and then copy both columns into your record selection formula, using val() like this;


val({EMPLOYEE.EMPLOYEE_NUMBER}) in [484458,
12345,
5589]

Each number would be on its own line, but it would execute. You'd just have to replace the comma at the end with a ].

-LB
 
Works like a charm. You are a Crystal Genius LBASS!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top