You need to sign in to do that
Don't have an account?

Text Formula - remove ".00"
Hello!
Here is the formula I am using:
"$" & IF(
Lease_PB_Total_Price__c >= 1000000,
TEXT(FLOOR( Lease_PB_Total_Price__c / 1000000)) & ",",
"") &
IF(
Lease_PB_Total_Price__c >= 1000,
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c / 1000)), 3) & ",",
"") &
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c)), 3) & "." &
IF(
MOD(Lease_PB_Total_Price__c , 1) * 100 < 10,
"0" & TEXT(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100),
TEXT(MIN(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100, 99))
)
Here is the result:
$30,628.00
I want to lose the ".00"
I tried rounding but do not think I can round with text?
Please help and thanks!
Shannon
Here is the formula I am using:
"$" & IF(
Lease_PB_Total_Price__c >= 1000000,
TEXT(FLOOR( Lease_PB_Total_Price__c / 1000000)) & ",",
"") &
IF(
Lease_PB_Total_Price__c >= 1000,
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c / 1000)), 3) & ",",
"") &
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c)), 3) & "." &
IF(
MOD(Lease_PB_Total_Price__c , 1) * 100 < 10,
"0" & TEXT(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100),
TEXT(MIN(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100, 99))
)
Here is the result:
$30,628.00
I want to lose the ".00"
I tried rounding but do not think I can round with text?
Please help and thanks!
Shannon
"$" & IF(
Lease_PB_Total_Price__c >= 1000000,
TEXT(FLOOR( Lease_PB_Total_Price__c / 1000000)) & ",",
"") &
IF(
Lease_PB_Total_Price__c >= 1000,
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c / 1000)), 3) & ",",
"") &
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c)), 3) & "." &
IF(
MOD(Lease_PB_Total_Price__c , 1) * 100 < 10,
"0" & TEXT(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100),
TEXT(MIN(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100, 99))
)
If you still want that functionality in the formula, you may be able to use this:
IF(
Lease_PB_Total_Price__c >= 1000000,
TEXT(FLOOR( Lease_PB_Total_Price__c / 1000000)) & ",",
"") &
IF(
Lease_PB_Total_Price__c >= 1000,
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c / 1000)), 3) & ",",
"") &
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c)), 3) &
IF(VALUE(RIGHT(TEXT(Lease_PB_Total_Price__c),2)) = 0,
"." & IF(
MOD(Lease_PB_Total_Price__c , 1) * 100 < 10,
"0" & TEXT(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100),
TEXT(MIN(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100, 99))
), "")
Notice the differences in the two underlined blocks and the line above them. It may not work exactly right, so you may need to tweek it.
Thanks,
Parker
All Answers
Why are you storing it as text and not a number?
Can you help?
I have done it for the first IF condtion, you can apply it for others also
Do I put it before the RIGHT function like this? Doesn't seem to like that though:
IF(
TotalPrice >= 1000,
LEFT(TEXT(FLOOR( TotalPrice / 1000)), LEN(TEXT(FLOOR(TotalPrice / 1000)))-3)&
RIGHT(TEXT(FLOOR(TotalPrice / 1000)), 3) & ",",
"") &
RIGHT(TEXT(FLOOR(TotalPrice)), 3)
This way didn't seem to do anything at all?
"$" & IF(
Lease_PB_Total_Price__c >= 1000000,
TEXT(FLOOR( Lease_PB_Total_Price__c / 1000000)) & ",",
"") &
IF(
Lease_PB_Total_Price__c >= 1000,
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c / 1000)), 3) & ",",
"") &
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c)), 3) & "." &
IF(
MOD(Lease_PB_Total_Price__c , 1) * 100 < 10,
"0" & TEXT(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100),
TEXT(MIN(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100, 99))
)
If you still want that functionality in the formula, you may be able to use this:
IF(
Lease_PB_Total_Price__c >= 1000000,
TEXT(FLOOR( Lease_PB_Total_Price__c / 1000000)) & ",",
"") &
IF(
Lease_PB_Total_Price__c >= 1000,
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c / 1000)), 3) & ",",
"") &
RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c)), 3) &
IF(VALUE(RIGHT(TEXT(Lease_PB_Total_Price__c),2)) = 0,
"." & IF(
MOD(Lease_PB_Total_Price__c , 1) * 100 < 10,
"0" & TEXT(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100),
TEXT(MIN(ROUND(MOD(Lease_PB_Total_Price__c , 1), 2) * 100, 99))
), "")
Notice the differences in the two underlined blocks and the line above them. It may not work exactly right, so you may need to tweek it.
Thanks,
Parker
... RIGHT(TEXT(FLOOR(Lease_PB_Total_Price__c)), 3) /*Remove that -> & "." */ & ....
I used the second one. I did not want the decimal.
Thanks!!
Shannon
Thanks again,
Parker.
Thanks again.