Forum Discussion
- QuickBaseCoachDQrew CaptainMy current tightest formula is this one
var number Value = Round([currency number],0.01);
var text Decimals = "." & Right(ToText(Int($value * 100)),2);
var text Thousands = If($Value>=1000,ToText(Int($Value/1000)));
var text Hundreds=Right(ToText(Int($Value)),3);
If($Value=0,"$0.00",
If($Value<0, "- ")
&
"$" & List(",",$Thousands,$Hundreds) & $Decimals) - JeffRogersonQrew CadetThanks again Mark ....
- AJCampaniQrew CadetThis looks like what I need but I'm having difficulty understanding how to utilize it. If I have a text formula field that chooses between two fields based on whether a box is checked, how does the above relate to my formula? Any help would be really appreciated!
- QuickBaseCoachDQrew CaptainIn answer to AJ ...
You could do this
var number MyValue = IF([My checkbox]=true, [My value for true], [My value for false]);
var number Value = Round($MyValue,0.01);
var text Decimals = "." & Right(ToText(Int($value * 100)),2);
var text Thousands = If($Value>=1000,ToText(Int($Value/1000)));
var text Hundreds=Right(ToText(Int($Value)),3);
If($Value=0,"$0.00",
If($Value<0, "- ")
&
"$" & List(",",$Thousands,$Hundreds) & $Decimals)
You would then replace the "My" fields with your own fields. - AJCampaniQrew CadetAwesome! Thanks for the help - I'll do that right now.
- ArchiveUserQrew CaptainIncredible. I thought every program had a format function!
- QuickBaseCoachDQrew CaptainBrad, out of curiosity, how would this be done in Excel?
- ArchiveUserQrew Captain=text(+[number],"$#,###.##)
- ArchiveUserQrew CaptainI did it with one formula one line in one cell. done.