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

Format a number within a text string 1

Status
Not open for further replies.

DilbertAsok

Technical User
Oct 28, 2009
5
GB
Using the formula:

Code:
IF {XXX.XXX} = "2 NYS" THEN "Not yet started:  "&DistinctCount ({XXX}, {XXX.XXX}) ELSE

[formula then continues with other IF statements]

The output of the above line looks like:

"Not yet started: 7.00", but as the output will always be an integer the decimal places are not needed.

As the output is a text string I cannot remove the decimal places using the normal formatting. Is there a way around this?

Thanks,
 
IF {XXX.XXX} = "2 NYS" THEN "Not yet started: "& totext(DistinctCount ({XXX}, {XXX.XXX}),0,"") ELSE

-LB
 
Perfect - thanks!

I was sure it was something around totext or tonumber but couldn't fix the conditions at the end!
 


DilbertAsok,

Welcome to Tek-Tips.

No doubt you have noticed the [purple]little purple Stars[/purple] as you browsed this forum. In this thread, in the lower left-hand corner of each post, is a link that states...

[blue]
Thank Tek-Tip Contributor
for this valuable post!
[/blue].

The [purple]little purple Stars[/purple] accomplish several important things.

First, it gives positive feedback to contributors, that their posts have been helpful.

Second, it identifies threads as containing helpful posts, so that other members can benefit.

And third, it identifies the original poster (that's YOU, BTW), as a grateful member, that not only receives, but is willing to give tokens of thanks.

Please use this [purple]link[/purple] whenever appropriate.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top