youbitto
New Member
- Joined
- Jun 8, 2022
- Messages
- 35
- Office Version
- 2019
- 2016
- 2013
- Platform
- Windows
Hello
I have this code that import a csv file to a worksheet and replace in the column "O" the "." with "," so I cant sum that column
however after excuting the code that column seems to be in a text format or something when I select that column it gives me the number of selected cells
My request is to covert the column "O" to number that can be summed
PS : I have a french excel that why I replace "." with ","
I have this code that import a csv file to a worksheet and replace in the column "O" the "." with "," so I cant sum that column
however after excuting the code that column seems to be in a text format or something when I select that column it gives me the number of selected cells
My request is to covert the column "O" to number that can be summed
PS : I have a french excel that why I replace "." with ","
VBA Code:
Sub LoadCSV_FileToSheet()
Dim wsheet As Worksheet, file_mrf As String
Dim wsDestination As Worksheet
Worksheets("listCreance").Range("A:P").Clear
Worksheets("listCreance").Range("Q5:Y99999").Clear
Set wsheet = ActiveWorkbook.Sheets("listCreance")
file_mrf = Application.GetOpenFilename("Text Files (*.csv),*.csv", , "Provide Text or CSV File:")
With wsheet.QueryTables.Add(Connection:="TEXT;" & file_mrf, Destination:=wsheet.Range("A4"))
.TextFileParseType = xlDelimited
.TextFileCommaDelimiter = True
.Refresh
End With
Columns("O").Replace What:=".", Replacement:=","
End Sub