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

limit decimal places when concatenating text and eqn.

Status
Not open for further replies.

rgreen511

Technical User
Aug 22, 2005
24
0
0
US
I'm using the following code, but I need to limit the first string to two fixed decimal places. How can I do that?

Code:
lb/MMBtu: IIf(IsNull((([ppm]*(100-[% M])/100)/[BTU]*1000000)) , (([ppm]*(100-[% M])/100)/[BTU]*1000000) , (([ppm]*(100-[% M])/100)/[BTU]*1000000) & "E-06")
 
Do you want to Round or Format? There is a difference:

[tt]?round(1.345,2)
1.34
?format(1.345,"#0.00")
1.35[/tt]
 
Thanks.

I was able to do it by entering this into the Format box in the column properties:

Code:
0.00"E-6"

and using only the

Code:
lb/MMBtu: (([ppm]*(100-[% M])/100)/[BTU]*1000000)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top