I am trying to find a way where I can convert this piece of code into one where I can combine the ranges. Although I am ok with coding, i feel its time I start to learn how to write more efficient code. any help would be great.
Code:
'BenchMark
lastrow = Range("D4000").End(xlUp).Row
Range("D6:D" & lastrow).Select
With Selection
.NumberFormat = "general"
End With
lastrow = Range("E4000").End(xlUp).Row
Range("E6:E" & lastrow).Select
With Selection
.NumberFormat = "m/d/yyyy"
End With
'minorcurve1
lastrow = Range("L4000").End(xlUp).Row
Range("L6:L" & lastrow).Select
With Selection
.NumberFormat = "general"
End With
lastrow = Range("M4000").End(xlUp).Row
Range("M6:M" & lastrow).Select
With Selection
.NumberFormat = "m/d/yyyy"
End With