rollnation2
New Member
- Joined
- Mar 18, 2021
- Messages
- 25
- Office Version
- 2016
- Platform
- Windows
I need to convert a few columns of raw data from text to numbers.
Using the following code works perfectly on column A. I need to perform the same conversion on columns D and S.
How do I modify the following VBA to convert column D and S?
Sub ConvertTextToNumber()
Set Rng = ThisWorkbook.Sheets("Sheet1").Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row)
With Rng
.NumberFormat = "General"
.Value = .Value
End With
End Sub
Using the following code works perfectly on column A. I need to perform the same conversion on columns D and S.
How do I modify the following VBA to convert column D and S?
Sub ConvertTextToNumber()
Set Rng = ThisWorkbook.Sheets("Sheet1").Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row)
With Rng
.NumberFormat = "General"
.Value = .Value
End With
End Sub