Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Conditional number formatting in Excel export

Conditional number formatting in Excel export

Conditional number formatting in Excel export

Hi all,

I have a Crystal report which has values which could be number or string.
The aim is to have them formatted as number if they are numbers and string if they are not - once they are exported to excel.

I have tried writing a conditional formula but since they are both going to live in the same field it does not like it.

I have also tried having two formula fields occupying the same space, one showing the number and supressed if it is not a number. The other showing the string and suppressed if it is a number.
However, this screws up the column alignment when exported to excel, its a shame as this does work!

Does anyone have anything other ideas of things to try?

RE: Conditional number formatting in Excel export

It seams the second option should work provide the two formula fields are exactly the same size and in the same position. I will check on my end. Of course, I am not sure how Excel will handle a mix of numbers and text.

I tested the concept on my end and it worked just fine.

RE: Conditional number formatting in Excel export


It appears as though this does work. However, it appears as though it still struggles with export - Data only.
Its not an issue, I have spoken to the user and they wont be using that option anyway.

RE: Conditional number formatting in Excel export


I'm not a CR guy but am Excel.

Can you clarify for me the issue regarding the text vs number in the same column, which Excel does not handle well: will you do arithmetic on these numeric values?

If not, you ought to store them as TEXT, that is TEXT DIGITS.
FAQ68-6659: When is a NUMBER not a NUMBER?.


glassesJust traded in my OLD subtlety...
for a NUance!tongue

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close