View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default Formatting currency with the cents but without the decimal point

On Mon, 25 Oct 2010 05:56:54 -0500, mrbobader
wrote:

I'm using VB through MS Excel and I needs to export check information in a text
format. The
bank is requiring that all fields take x number of characters, which I have
been
able to do except that the check amount needs to read 11 digits without
the decimal place. ie: $247.84 becomes 0000024784. I can get it to
00000247.84 with the vAmt = Format(Sheet1.Cells(i, 4),
"00000000.00")
but the minute I
take out the decimal, I get a decimal, I get 0000000247.

Note: vAmt is:
Dim vAmt As String



vAmt = Format(Sheet1.Cells(i, 4) * 100, "00000000000")