Hi,
I have an excel sheet with one colum and many rows that filled with long deciaml numbers(positive and negetive).
I need to write all these numbers into a txt file with the following terms:
1. the decimal numbers must be shorten to 6 digits after the point.
2. the numbers must come one after the other with a ";" between them
not in lines as thay appear in the workbook.

in the following code i used round function to define the numbers of decimal places but the problom that it drops sometimes the first digit in the number,
for example "0.123456789" i see as ".123456".
i also dont know how to combine them into one line with a sepeprator.

[VBA][/VBA][VBA][/VBA][VBA][/VBA][VBA][/VBA][VBA]Public Sub save_to_txt()
Close #1
Open "D:\WRITE_TEST.txt" For Output As #1
Dim RowIndex As Integer
Dim cellsvalue As Double
RowIndex = 1

While IsEmpty(Cells(RowIndex, 3)) = 0
cellsvalue = Round(Cells(RowIndex, 3), 6)
Write #1, cellsvalue
RowIndex = RowIndex + 1
Wend
Close #1
End Sub[/VBA]