BrianWestr Posted February 4, 2005 Share Posted February 4, 2005 I need a calculation to place a $ and the comma at the appropiate place. The field must remain a in text format not a number format. Thanks Link to comment Share on other sites More sharing options...
bikergeek Posted February 4, 2005 Share Posted February 4, 2005 Is there a specific range for the number in the field? I.e. between 1 and 99,000 or between 1 and 1,000,000. The following assumes the latter, but you can add cases testing l > (multiple of 3) to extend the calculation. calcField = Let ( l = Length(InputField) ; "$" & Case( l > 6 ; Left(InputField;l-6) & "," & Middle(InputField;l-5;3) & "," & Right(InputField;3) ; l > 3 ; Left(InputField;l-3) & "," & Right(InputField;3) ; InputField ) ) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.