Hi, I'm very new to VBA. I'm trying to get numbers stored as text converted to numbers, while keeping the same number of decimals the value had while stored as text and add a comma to any number that is over a thousand. The closest I could get was changing the number format to general, but that doesn't give me commas, and anything with a .0 comes back as a whole number. I also tried a custom format like #,###.##, but that gives me a decimal point on a whole number. Any tips or tricks would be appreciated!
VBA Code:
ws.Range("C4:C" & lastrow, Cells(lngLastColumn)).Select
With Selection
Selection.NumberFormat = "General" 'need to figure how to get floating decimals
.Value = .Value