I am creating a text file using excel spreadsheet. I have a handle on the actually formatting of the text file, the problem I have is that the way the numbers need to be converted are difficult. For example, the number format for 1000.00000 would be 0100000000 and for 978.7562 would be 009787562000000 and needs to be padded out 14spaces with 0 filler if it goes out that far. I know I can probably bump the decimal places out to acheive that requirement, but here is where i am having issues.
First i need to know how to pad the beginning of the number with the 0's. I am not sure of that. And secondly, how do i remove the decimal mark, but continue with the number string.
basically i am using a cell reference and then a format refernece in my VBA.... but i cannot get it working right.
If I use format "000000000000" I get this result 00000000000431 if i use the "#########" format i get this result 431 and and the excel number is 430.80939948 and it should be 0043080939948
Ideas on the VBA code to make this happen. Or if i can parse out the decimal in excel and add the padded 0 at the beginning?
First i need to know how to pad the beginning of the number with the 0's. I am not sure of that. And secondly, how do i remove the decimal mark, but continue with the number string.
basically i am using a cell reference and then a format refernece in my VBA.... but i cannot get it working right.
If I use format "000000000000" I get this result 00000000000431 if i use the "#########" format i get this result 431 and and the excel number is 430.80939948 and it should be 0043080939948
Ideas on the VBA code to make this happen. Or if i can parse out the decimal in excel and add the padded 0 at the beginning?